[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added CC||jakub at gcc dot gnu.org --- Comment #5 from Jakub Jelinek jakub at gcc dot gnu.org --- Less artificially looking testcase. /* PR middle-end/63608 */ typedef long T; typedef unsigned long U; unsigned long a; unsigned long foo (int b) { T c = 0; const U d = 2248593032UL; a = (c = +d) | (~4L ~b); return c; } Testing the backport now, seems fold-const.c pretty much assumes everywhere that if argN is INTEGER_CST, then argN == opN, but the missing NON_LVALUE_EXPR case of course breaks this. So, fixing it at the spots that just pass argN if it is known to be INTEGER_CST is not really doable. If the patch would be too dangerous (most likely is not), then another option is just to fold NON_LVALUE_EXPR of INTEGER_CST to the INTEGER_CST.
[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED --- Comment #8 from Jakub Jelinek jakub at gcc dot gnu.org --- Fixed.
[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608 --- Comment #7 from Jakub Jelinek jakub at gcc dot gnu.org --- Author: jakub Date: Fri Jun 12 11:53:34 2015 New Revision: 224419 URL: https://gcc.gnu.org/viewcvs?rev=224419root=gccview=rev Log: PR middle-end/63608 * gcc.c-torture/compile/pr63608.c: New test. Backported from mainline 2014-05-16 Eric Botcazou ebotca...@adacore.com * fold-const (fold_unary_loc) NON_LVALUE_EXPR: New case. CASE_CONVERT: Pass arg0 instead of op0 to fold_convert_const. Added: branches/gcc-4_8-branch/gcc/testsuite/gcc.c-torture/compile/pr63608.c Modified: branches/gcc-4_8-branch/gcc/ChangeLog branches/gcc-4_8-branch/gcc/fold-const.c branches/gcc-4_8-branch/gcc/testsuite/ChangeLog
[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608 --- Comment #6 from Jakub Jelinek jakub at gcc dot gnu.org --- Author: jakub Date: Fri Jun 12 11:52:42 2015 New Revision: 224418 URL: https://gcc.gnu.org/viewcvs?rev=224418root=gccview=rev Log: PR middle-end/63608 * gcc.c-torture/compile/pr63608.c: New test. Backported from mainline 2014-05-16 Eric Botcazou ebotca...@adacore.com * fold-const (fold_unary_loc) NON_LVALUE_EXPR: New case. CASE_CONVERT: Pass arg0 instead of op0 to fold_convert_const. Added: branches/gcc-4_9-branch/gcc/testsuite/gcc.c-torture/compile/pr63608.c Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/fold-const.c branches/gcc-4_9-branch/gcc/testsuite/ChangeLog
[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608 Kai Tietz ktietz at gcc dot gnu.org changed: What|Removed |Added CC||ktietz at gcc dot gnu.org --- Comment #4 from Kai Tietz ktietz at gcc dot gnu.org --- Issue is fixed on 5.0 gcc. But confirm that issue still exists on 4.9 branch.
[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608 Jakub Jelinek jakub at gcc dot gnu.org changed: What|Removed |Added Target Milestone|4.8.4 |4.8.5 --- Comment #3 from Jakub Jelinek jakub at gcc dot gnu.org --- GCC 4.8.4 has been released.
[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608 --- Comment #2 from Eric Botcazou ebotcazou at gcc dot gnu.org --- But the testcase looks completely artificial and this ICEs only because the compiler is configured with --enable-checking.
[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608 Richard Biener rguenth at gcc dot gnu.org changed: What|Removed |Added Keywords||ice-checking, ||ice-on-valid-code Priority|P3 |P2 CC||ebotcazou at gcc dot gnu.org
[Bug middle-end/63608] [4.8/4.9 Regression] error: type mismatch in binary expression
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63608 Marek Polacek mpolacek at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2014-10-23 Component|c |middle-end CC||mpolacek at gcc dot gnu.org Ever confirmed|0 |1 Summary|[4.8 Regression]error: type |[4.8/4.9 Regression] error: |mismatch in binary |type mismatch in binary |expression |expression Target Milestone|--- |4.8.4 Severity|critical|normal --- Comment #1 from Marek Polacek mpolacek at gcc dot gnu.org --- This worked with 4.4, broken with 4.[56789], doesn't ICE with trunk where it was fixed by r210518. I think this is backportable.