[Bug tree-optimization/44328] switch/case optimization produces an invalid lookup table index
--- Comment #30 from ibolton at gcc dot gnu dot org 2010-09-01 11:25 --- (In reply to comment #28) > Hm, no, I was too quick pruning my inbox. The patch apparently has > not been applied to the 4.5 branch. > It's on its way. I've been testing in conjunction with a couple of other backports and ran into some issues unrelated to this patch. I'm hoping to be ready to apply to 4.5 tomorrow. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44328
[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)
--- Comment #15 from ibolton at gcc dot gnu dot org 2010-09-02 13:05 --- Subject: Bug 45070 Author: ibolton Date: Thu Sep 2 13:05:30 2010 New Revision: 163774 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163774 Log: 2010-09-02 Ian Bolton Backport from mainline 2010-09-01 Ian Bolton * Makefile.in (tree-switch-conversion.o): Update dependencies. 2010-08-19 Ian Bolton PR target/45070 * config/arm/arm.c (arm_output_epilogue): Ensure that return value of size 1-3 is handled correctly. * gcc.c-torture/execute/pr45070.c: New. 2010-08-19 Ian Bolton * tree-switch-conversion.c (gen_inbound_check): Ensure that the type for the conditional has wide enough range. * g++.dg/pr44328.C: New test. 2010-08-07 Marcus Shawcroft * config/arm/linux-atomic.c (SUBWORD_VAL_CAS): Instantiate with 'unsigned short' and 'unsigned char' instead of 'short' and 'char'. (SUBWORD_BOOL_CAS): Likewise. (SUBWORD_SYNC_OP): Likewise. (SUBWORD_TEST_AND_SET): Likewise. (FETCH_AND_OP_WORD): Parenthesise INF_OP (SUBWORD_SYNC_OP): Likewise. (OP_AND_FETCH_WORD): Likewise. * lib/target-supports.exp: (check_effective_target_sync_int_long): Add arm*-*-linux-gnueabi. (check_effective_target_sync_char_short): Likewise. Added: branches/gcc-4_5-branch/gcc/testsuite/g++.dg/pr44328.C - copied unchanged from r163367, trunk/gcc/testsuite/g++.dg/pr44328.C branches/gcc-4_5-branch/gcc/testsuite/gcc.c-torture/execute/pr45070.c - copied unchanged from r163367, trunk/gcc/testsuite/gcc.c-torture/execute/pr45070.c Modified: branches/gcc-4_5-branch/gcc/ChangeLog branches/gcc-4_5-branch/gcc/Makefile.in branches/gcc-4_5-branch/gcc/config/arm/arm.c branches/gcc-4_5-branch/gcc/config/arm/linux-atomic.c branches/gcc-4_5-branch/gcc/testsuite/ChangeLog branches/gcc-4_5-branch/gcc/testsuite/lib/target-supports.exp branches/gcc-4_5-branch/gcc/tree-switch-conversion.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070
[Bug tree-optimization/44328] switch/case optimization produces an invalid lookup table index
--- Comment #34 from ibolton at gcc dot gnu dot org 2010-09-02 13:10 --- (In reply to comment #33) > Yes, 4.4.5 and maybe 4.4.6 is planned. > (In reply to comment #31) > (In reply to comment #30) > > (In reply to comment #28) > > > Hm, no, I was too quick pruning my inbox. The patch apparently has > > > not been applied to the 4.5 branch. > > > > > > > It's on its way. I've been testing in conjunction with a couple of other > > backports and ran into some issues unrelated to this patch. I'm hoping to > > be > > ready to apply to 4.5 tomorrow. > > > > OK, reassigning to you then. Please do not forget to add a hunk > adding the new dependence of tree-switch-conversion.o in Makefile.in. > > Thanks. > I have just committed the backport to 4.5 branch. I will start on the 4.4 backport now, but I will need to do the usual testing before it is ready ... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44328
[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)
--- Comment #17 from ibolton at gcc dot gnu dot org 2010-09-07 09:26 --- (In reply to comment #16) > I'd like it backported to 4.4 if possible, thanks > Just awaiting approval on the mailing list. It's ready to go. -- ibolton at gcc dot gnu dot org changed: What|Removed |Added AssignedTo|unassigned at gcc dot gnu |ibolton at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2010-07-28 09:01:18 |2010-09-07 09:26:10 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070
[Bug tree-optimization/44328] switch/case optimization produces an invalid lookup table index
--- Comment #35 from ibolton at gcc dot gnu dot org 2010-09-07 09:27 --- (In reply to comment #32) > I don't know if there are plans for more releases in the 4.4 series, but can > it > be applied to the 4.4 branch too? > The backport for 4.4 is ready. I am just waiting for approval on the mailing list, although it is probably "obvious". -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44328
[Bug target/45070] Miscompiled c++ class with packed attribute on ARM with -Os optimizations (Qt 4.6.2)
--- Comment #18 from ibolton at gcc dot gnu dot org 2010-09-07 11:07 --- Subject: Bug 45070 Author: ibolton Date: Tue Sep 7 11:07:31 2010 New Revision: 163945 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=163945 Log: 2010-09-07 Ian Bolton Backport from mainline 2010-09-01 Ian Bolton * Makefile.in (tree-switch-conversion.o): Update dependencies. 2010-08-19 Ian Bolton PR target/45070 * config/arm/arm.c (arm_output_epilogue): Ensure that return value of size 1-3 is handled correctly. * gcc.c-torture/execute/pr45070.c: New. 2010-08-19 Ian Bolton * tree-switch-conversion.c (gen_inbound_check): Ensure that the type for the conditional has wide enough range. * g++.dg/pr44328.C: New test. 2010-08-07 Marcus Shawcroft * config/arm/linux-atomic.c (SUBWORD_VAL_CAS): Instantiate with 'unsigned short' and 'unsigned char' instead of 'short' and 'char'. (SUBWORD_BOOL_CAS): Likewise. (SUBWORD_SYNC_OP): Likewise. (SUBWORD_TEST_AND_SET): Likewise. (FETCH_AND_OP_WORD): Parenthesise INF_OP (SUBWORD_SYNC_OP): Likewise. (OP_AND_FETCH_WORD): Likewise. * lib/target-supports.exp: (check_effective_target_sync_int_long): Add arm*-*-linux-gnueabi. (check_effective_target_sync_char_short): Likewise. Added: branches/gcc-4_4-branch/gcc/testsuite/g++.dg/pr44328.C - copied unchanged from r163774, branches/gcc-4_5-branch/gcc/testsuite/g++.dg/pr44328.C branches/gcc-4_4-branch/gcc/testsuite/gcc.c-torture/execute/pr45070.c - copied unchanged from r163774, branches/gcc-4_5-branch/gcc/testsuite/gcc.c-torture/execute/pr45070.c Modified: branches/gcc-4_4-branch/gcc/ChangeLog branches/gcc-4_4-branch/gcc/Makefile.in branches/gcc-4_4-branch/gcc/config/arm/arm.c branches/gcc-4_4-branch/gcc/config/arm/linux-atomic.c branches/gcc-4_4-branch/gcc/testsuite/ChangeLog branches/gcc-4_4-branch/gcc/testsuite/lib/target-supports.exp branches/gcc-4_4-branch/gcc/tree-switch-conversion.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45070
[Bug debug/45447] ICE with `-g -femit-struct-debug-baseonly'
-- ibolton at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||ice-on-valid-code Known to fail||4.4.5 4.5.2 4.6.0 Last reconfirmed|-00-00 00:00:00 |2010-09-07 12:40:03 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45447
[Bug tree-optimization/45256] Missed arithmetic simplification at tree level
--- Comment #2 from ibolton at gcc dot gnu dot org 2010-09-07 13:05 --- (In reply to comment #1) > Created an attachment (id=21454) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21454&action=view) [edit] > Testcase > OK. I can see this happening on trunk, when compiled as follows: arm-none-linux-gnueabi/obj/gcc3/gcc/cc1 -O2 pr45256.i -fdump-tree-all -fdump-rtl-all. The 148t.optimized dump shows exactly what has been posted above, where effectively 32 is both added and then subtracted. The 183r.dce dump still shows this extra work happening and the 184r.combine dump shows that it has been optimised away. It should be possible to do this optimisation at the tree-level, so this bug is confirmed. Should I check whether this happens for 4.4 and 4.5 too? -- ibolton at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||missed-optimization Known to fail||4.6.0 Last reconfirmed|-00-00 00:00:00 |2010-09-07 13:05:49 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45256
[Bug bootstrap/45174] Make fails in zlib
--- Comment #22 from ibolton at gcc dot gnu dot org 2010-09-07 14:44 --- (In reply to comment #21) > Subject: Re: Make fails in zlib > > Hello; > Well I solved my problem, however the issue still remains. I installed > the latest native binutils and gcc-4.5.1 on my linux installation. The > script now works without any errors. > > However it appears that using the supplied binutils and compilers from > Ubuntu 10.04 there is a problem creating the cross compilers. I do not > know how or if I should proceed from here. It maybe there there is some > subtle error in the bins supplied with Ubuntu. > > Thank You, > Donald Schlicht > I've just read this thread and am now unsure as to whether there is a bug with GCC or not. It sounds like your initial troubles have gone away and now there is a new problem. Would it make sense to close this bug and raise a new bug to cover the new issue? -- ibolton at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45174
[Bug target/44557] internal compiler error: in gen_thumb_movhi_clobber, at config/arm/arm.md:5811
--- Comment #5 from ibolton at gcc dot gnu dot org 2010-09-07 16:24 --- (In reply to comment #4) > I my earlier tests I failed to notice that this test case triggers one of two > different ICEs, depending on options and compiler version. I also mistakenly > tested with a locally modified gcc-4.4. > > The ICE in this PR, in gen_thumb_movhi_clobber, is triggered by r147270 + > r147274, updates to loop-invariant.c part of PR33928 fixes with no ARM > specific > bits. Another ICE, in default_secondary_reload, is triggered by r146904. > Which ICE you get depends on -f{no-,}forward-propagate. Both ICEs disappear > if > r146904 is reverted. gcc-4.4.4 includes a backport or r146904 and does > trigger > the default_secondary_reload ICE. gcc-4.3.4 does not ICE. > I can't get this to ICE with latest version of 4.4, 4.5 or 4.6 branches. I am doing: arm-none-linux-gnueabi/obj/gcc3/gcc/cc1 -O1 -mthumb -fno-omit-frame-pointer pr44557.i Please can someone else try to see if they can still get the ICE. -- ibolton at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44557
[Bug middle-end/44554] Stack space after sigsetjmp is reused
--- Comment #7 from ibolton at gcc dot gnu dot org 2010-09-08 08:49 --- (In reply to comment #6) > (In reply to comment #5) > > Do we need to act as if > > -fno-ira-share-spill-slots > > is set in cfun->calls_setjmp functions? > > At least in my case "-Os -fno-ira-share-spill-slots" seems to solve the > problem. This applies also to the original (not stripped down) version of the > code. > Is this still a bug then? Should ira-share-spill-slots be automatically disabled for the caller function when a callee function can return twice? -- ibolton at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44554
[Bug target/44189] PIC compilation on ARM screws up DWARF lineinfo in function prologue
--- Comment #3 from ibolton at gcc dot gnu dot org 2010-09-08 09:12 --- Thanks for raising this bug, Gergely, and suggesting a patch. I've moved the bug to the NEW state, so if you want to post your patch to the gcc-patches list, then you will hopefully get some feedback on it there and we will be able to work towards an approved fix. -- ibolton at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail||4.6.0 4.5.3 4.4.5 Last reconfirmed|-00-00 00:00:00 |2010-09-08 09:12:00 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44189
[Bug middle-end/43976] warning about increased alignment during casting printed even though variable is properly aligned
--- Comment #5 from ibolton at gcc dot gnu dot org 2010-09-08 10:02 --- Confirmed on latest 4.4, 4.5 and 4.6 (trunk). Related GCC documentation on alignment of structure fields is here: http://gcc.gnu.org/onlinedocs/gcc-4.5.0/gcc/Variable-Attributes.html#Variable-Attributes In the short-term, one workaround is to write the code as follows: #include struct Foo { char c[sizeof(int)]; } __attribute__((aligned(4))); char junk; Foo f; int main() { int *i = reinterpret_cast(&f); *i = 0x44434241; printf("%c %c %c %c", f.c[0], f.c[1], f.c[2], f.c[3]); } By aligning the structure Foo to 4 bytes, you can successfully cast a Foo* to an int* and then initialise all four chars in one go. (Without the type attribute for the struct Foo, you still get the warning.) My example prints "A B C D". FYI: I have tracked down the alleged offending code mentioned in an earlier comment to build_c_cast() in c-typeck.c. -- ibolton at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Known to fail||4.4.5 4.5.2 4.6.0 Last reconfirmed|-00-00 00:00:00 |2010-09-08 10:02:04 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43976
[Bug bootstrap/45174] Make fails in zlib
--- Comment #23 from ibolton at gcc dot gnu dot org 2010-09-08 10:06 --- (In reply to comment #21) > Subject: Re: Make fails in zlib > > Hello; > Well I solved my problem, however the issue still remains. I installed > the latest native binutils and gcc-4.5.1 on my linux installation. The > script now works without any errors. > > However it appears that using the supplied binutils and compilers from > Ubuntu 10.04 there is a problem creating the cross compilers. I do not > know how or if I should proceed from here. It maybe there there is some > subtle error in the bins supplied with Ubuntu. > > Thank You, > Donald Schlicht > I've just read this thread and am now unsure as to whether there is a bug with GCC or not. It sounds like your initial troubles have gone away and now there is a new problem. Would it make sense to close this bug and raise a new bug to cover the new issue? -- ibolton at gcc dot gnu dot org changed: What|Removed |Added CC| |ibolton at gcc dot gnu dot ||org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45174
[Bug rtl-optimization/43491] Unnecessary temporary for global register variable
--- Comment #1 from ibolton at gcc dot gnu dot org 2010-09-08 16:21 --- reg is assigned to a temporary (reg.0) at the very first tree pass, as shown by this 004t.gimple dump: d () { struct b * const reg.0; unsigned int * D.2019; int D.2020; goto ; : c (); : reg.0 = reg; D.2019 = ®.0->j; D.2020 = diff (D.2019); if (D.2020 != 0) goto ; else goto ; : } I'm thinking that this is perfectly normal thing to do, and that the redundant move is meant to disappear in a later pass. My guess is that IRA is choosing not to assign the pseudo to r4, but I do not know why at the moment. -- ibolton at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||missed-optimization, ra Known to fail||4.5.3 4.6.0 Last reconfirmed|-00-00 00:00:00 |2010-09-08 16:21:50 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43491
[Bug tree-optimization/44328] switch/case optimization produces an invalid lookup table index
--- Comment #36 from ibolton at gcc dot gnu dot org 2010-09-09 15:37 --- Fixed in 4.4, 4.5 and trunk. -- ibolton at gcc dot gnu dot org changed: What|Removed |Added Status|ASSIGNED|RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44328
[Bug target/45616] internal compiler error: in note_invalid_constants, at config/arm/arm.c:11243
--- Comment #5 from ibolton at gcc dot gnu dot org 2010-09-13 11:04 --- Reporter needs to try again with different configure options. (We may still want a more user-friendly way of catching the original problem though.) -- ibolton at gcc dot gnu dot org changed: What|Removed |Added CC||ibolton at gcc dot gnu dot ||org Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45616
[Bug target/45616] internal compiler error: in note_invalid_constants, at config/arm/arm.c:11243
--- Comment #6 from ibolton at gcc dot gnu dot org 2010-09-14 14:29 --- Technically, this is ICE on invalid code, but a more user-friendly error would be better. As it happens, one has been added to trunk, as of 16th June. http://gcc.gnu.org/ml/gcc-patches/2010-06/msg01501.html I will backport it to 4.5, unless Mr Brook wants to. -- ibolton at gcc dot gnu dot org changed: What|Removed |Added CC||pbrook at gcc dot gnu dot ||org Status|WAITING |NEW Ever Confirmed|0 |1 Keywords|ice-on-valid-code |ice-on-invalid-code Known to fail||4.5.1 Known to work||4.6.0 Last reconfirmed|-00-00 00:00:00 |2010-09-14 14:29:06 date|| Target Milestone|--- |4.5.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45616
[Bug lto/45727] ICE: in subreg_get_info, at rtlanal.c:3092
--- Comment #3 from ibolton at gcc dot gnu dot org 2010-09-21 14:40 --- Which architecture/cpu are you wanting to build for? I'm not sure what the default is. If you can specify that when you configure, and then post the outcome of the build, that would be helpful. -- ibolton at gcc dot gnu dot org changed: What|Removed |Added CC||ibolton at gcc dot gnu dot | |org Status|UNCONFIRMED |WAITING http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45727
[Bug lto/45729] -flto conflicts with -mthumb
--- Comment #1 from ibolton at gcc dot gnu dot org 2010-09-21 15:30 --- Unfortunately, LTO does not officially work on ARM yet. There are many LTO failures in the gcc testsuite at the moment. Can you retry without LTO so we can diagnose the interworking problems? -- ibolton at gcc dot gnu dot org changed: What|Removed |Added CC||ibolton at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|-00-00 00:00:00 |2010-09-21 15:30:17 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45729