[Bug middle-end/44197] varpool SEGV
--- Comment #2 from ams at gcc dot gnu dot org 2010-05-19 16:46 --- Jeff, it was recommended that I add you as CC. Apologies if that was not appropriate. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44197
[Bug middle-end/44197] varpool SEGV
--- Comment #1 from ams at gcc dot gnu dot org 2010-05-19 16:46 --- Created an attachment (id=20703) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20703&action=view) test case This test case is reduced from uClibc sources. To reproduce the bug: cc1 -fpreprocessed __C_ctype_b_10.i -O1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44197
[Bug middle-end/44197] New: varpool SEGV
assemble_alias in varasm.c sets varpool->alias to 1, but fails to set varpool->extra_name to anything. This leads to trouble further down the line. In my case, varpool_remove_node fails with a NULL-pointer exception. This appears to be target/host independent. So far, the only work around I have is to disable optimization. Test case to follow ... -- Summary: varpool SEGV Product: gcc Version: 4.6.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: critical Priority: P3 Component: middle-end AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ams at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44197
[Bug target/36133] GCC creates suboptimal ASM : Code includes unneeded TST instructions
--- Comment #11 from ams at gcc dot gnu dot org 2008-11-19 12:03 --- The patch just committed should fix this issue. The patch discussion is here: http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00641.html -- ams at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36133
[Bug target/36133] GCC creates suboptimal ASM : Code includes unneeded TST instructions
--- Comment #10 from ams at gcc dot gnu dot org 2008-11-19 11:25 --- Subject: Bug 36133 Author: ams Date: Wed Nov 19 11:23:28 2008 New Revision: 141999 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141999 Log: 2008-11-19 Andrew Stubbs <[EMAIL PROTECTED]> gcc/ PR target/36133 * config/m68k/m68k.h (CC_OVERFLOW_UNUSABLE, CC_NO_CARRY): New defines. * config/m68k/m68k.c (notice_update_cc): Set cc_status properly for shift instructions. * config/m68k/m68k.md: Adjust all conditional branches that use the carry and overflow flags so they understand CC_OVERFLOW_UNUSABLE. gcc/testsuite/ PR target/36133 * gcc.target/m68k/pr36133.c: New test. Added: trunk/gcc/testsuite/gcc.target/m68k/pr36133.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/m68k/m68k.c trunk/gcc/config/m68k/m68k.h trunk/gcc/config/m68k/m68k.md trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36133
[Bug target/36134] GCC creates suboptimal ASM : usage of ADDA.L where LEA could be used
--- Comment #8 from ams at gcc dot gnu dot org 2008-11-14 10:53 --- The patch posted here has been accepted and committed: http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00581.html This should resolve this issue. Andrew -- ams at gcc dot gnu dot org changed: What|Removed |Added CC||ams at gcc dot gnu dot org Status|UNCONFIRMED |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36134
[Bug target/36134] GCC creates suboptimal ASM : usage of ADDA.L where LEA could be used
--- Comment #7 from ams at gcc dot gnu dot org 2008-11-14 10:50 --- Subject: Bug 36134 Author: ams Date: Fri Nov 14 10:49:06 2008 New Revision: 141853 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=141853 Log: 2008-11-14 Maxim Kuvyrkov <[EMAIL PROTECTED]> Andrew Stubbs <[EMAIL PROTECTED]> Gunnar Von Boehn <[EMAIL PROTECTED]> gcc/ PR target/36134 * config/m68k/m68k.md (addsi3_5200): Add a new alternative preferring the shorter LEA insn over ADD.L where possible. gcc/testsuite/ PR target/36134 * gcc.target/m68k/pr36134.c: New test. Added: trunk/gcc/testsuite/gcc.target/m68k/pr36134.c Modified: trunk/gcc/ChangeLog trunk/gcc/config/m68k/m68k.md trunk/gcc/testsuite/ChangeLog -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36134
[Bug target/36133] GCC creates suboptimal ASM : Code includes unneeded TST instructions
--- Comment #9 from ams at gcc dot gnu dot org 2008-11-10 13:01 --- > > This tst instruction is unneeded as the LSR is setting the flags correctly > > already. > > This is NOT correct. LSL does write to the condition codes, but not all of it. > In particular, the bit involved in the not-equal test is not set. Hmm, on re-reading the manual, I seem to have misunderstood this. The description of the instruction states certain bits are set, but then, on the next page the table shows all the bits being updated. I'm going to need to think about this one some more. Sorry for the noise :( Andrew -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36133
[Bug target/36133] GCC creates suboptimal ASM : Code includes unneeded TST instructions
--- Comment #7 from ams at gcc dot gnu dot org 2008-11-10 12:29 --- (In reply to comment #4) > There are two causes where GCC generates unneeded TST instructions. > A) General arithmetic > lsr.l #1,D0 > tst.l d0 > jbne ... > > This tst instruction is unneeded as the LSR is setting the flags correctly > already. This is NOT correct. LSL does write to the condition codes, but not all of it. In particular, the bit involved in the not-equal test is not set. This TST *is* required. > B) subq.l #1,D1 > tst.l d1 > jbne ... > > This unneeded TST is related to the compile option used. > If you compile the source with "-O2" then the second unneeded TST instructions > are not included in the source. Please check the code mode carefully. This TST is not related to the SUBQ instruction. This TST is related to the LSL instruction - the TST is a branch target. The compiler has combined the initial and subsequent loop condition tests into one test, thus saving space, as per the -Os requirements. In this case there is an alternative, more speed efficient solution, but that is a separate problem, and not a misuse of the TST instruction. As you say, the compiler gets it right at -O2, so the machine description is clearly correct, in this respect. -- ams at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution||INVALID http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36133