[Bug middle-end/52450] FAIL: gcc.dg/torture/pr52402.c at -O1 and above
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |4.8.0 See Also||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=58253, ||https://gcc.gnu.org/bugzill ||a/show_bug.cgi?id=52402 Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #14 from Andrew Pinski --- Fxied so closing.
[Bug middle-end/52450] FAIL: gcc.dg/torture/pr52402.c at -O1 and above
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 --- Comment #13 from John David Anglin danglin at gcc dot gnu.org 2012-12-01 20:17:22 UTC --- Author: danglin Date: Sat Dec 1 20:17:13 2012 New Revision: 194026 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=194026 Log: PR middle-end/52450 * gcc.dg/torture/pr52402.c: Remove xfail for hppa*-*-hpux*. Modified: trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/torture/pr52402.c
[Bug middle-end/52450] FAIL: gcc.dg/torture/pr52402.c at -O1 and above
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 --- Comment #12 from John David Anglin danglin at gcc dot gnu.org 2012-03-21 19:39:23 UTC --- Seems fixed on trunk: http://gcc.gnu.org/ml/gcc-testresults/2012-03/msg02426.html Started working on movmisalign but implementation is a bit tricky.
[Bug middle-end/52450] FAIL: gcc.dg/torture/pr52402.c at -O1 and above
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 --- Comment #11 from dave.anglin at bell dot net 2012-03-13 14:41:57 UTC --- On 3/12/2012 5:58 AM, rguenther at suse dot de wrote: Btw, alignof () of a packed struct type is 1 (it could be nested in another packed struct). At -O0, the reference passed to foo is misaligned but the struct is copied in foo with memcpy.;; Function foo (foo) foo (struct T t) { v4si D.1253; struct T t.0; # BLOCK 2 # PRED: ENTRY (fallthru) t.0 = t; D.1253_1 = t.0.i[0]; retval = D.1253_1; return retval; # SUCC: EXIT } ;; t.0 = t; (insn 7 6 8 (set (reg/f:SI 99) (reg/f:SI 91 virtual-stack-vars)) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg /torture/pr52402.c:10 -1 (nil)) (insn 8 7 9 (set (reg/f:SI 100) (reg/v/f:SI 98)) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402. c:10 -1 (nil)) (insn 9 8 10 (set (reg:SI 101) (const_int 36 [0x24])) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr 52402.c:10 -1 (nil)) (insn 10 9 11 (set (reg:SI 26 %r26) (reg/f:SI 99)) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402.c:10 -1 (nil)) (insn 11 10 12 (set (reg:SI 25 %r25) (reg/f:SI 100)) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402.c:10 -1 (nil)) (insn 12 11 13 (set (reg:SI 24 %r24) (reg:SI 101)) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402.c:10 -1 (nil)) (call_insn 13 12 14 (parallel [ (set (reg:SI 28 %r28) (call (mem:SI (symbol_ref/v:SI (@memcpy) [flags 0x41] function_decl 7af9ee00 memcpy) [0 S4 A32]) (const_int 16 [0x10]))) (clobber (reg:SI 1 %r1)) (clobber (reg:SI 2 %r2)) (use (const_int 0 [0])) ]) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402.c:10 -1 (expr_list:REG_EH_REGION (const_int 0 [0]) (nil)) (expr_list:REG_DEP_TRUE (use (reg:SI 24 %r24)) (expr_list:REG_DEP_TRUE (use (reg:SI 25 %r25)) (expr_list:REG_DEP_TRUE (use (reg:SI 26 %r26)) (nil) (insn 14 13 0 (set (reg:SI 102) (reg:SI 28 %r28)) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402.c:10 -1 (nil)) At -O1, there is no copy. foo (struct T t) { v4si SR.1; # BLOCK 2 freq:1 # PRED: ENTRY [100.0%] (fallthru,exec) SR.1_5 = MEM[(struct T *)t]; retval = SR.1_5; return retval; # SUCC: EXIT [100.0%] } ;; retval = SR.1_5; (insn 7 6 8 (set (reg:SI 99) (mem/c:SI (reg/v/f:SI 98) [0 MEM[(struct T *)t]+0 S4 A8])) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402.c:12 -1 (nil)) (insn 8 7 9 (set (mem/c/i:SI (reg/f:SI 97) [0 retval+0 S4 A128]) (reg:SI 99)) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402.c:12 -1 (nil)) (insn 9 8 10 (set (reg:SI 100) (mem/c:SI (plus:SI (reg/v/f:SI 98) (const_int 4 [0x4])) [0 MEM[(struct T *)t]+4 S4 A8])) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402.c:12 -1 (nil)) (insn 10 9 11 (set (mem/c/i:SI (plus:SI (reg/f:SI 97) (const_int 4 [0x4])) [0 retval+4 S4 A32]) (reg:SI 100)) /test/gnu/gcc/gcc/gcc/testsuite/gcc.dg/torture/pr52402.c:12 -1 (nil)) The alignment of the mem's in insns 7 and 9 is inconsistent with the alignment for the mode. Dave
[Bug middle-end/52450] FAIL: gcc.dg/torture/pr52402.c at -O1 and above
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 --- Comment #7 from rguenther at suse dot de rguenther at suse dot de 2012-03-12 09:55:54 UTC --- On Sun, 11 Mar 2012, danglin at gcc dot gnu.org wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 John David Anglin danglin at gcc dot gnu.org changed: What|Removed |Added Component|target |middle-end --- Comment #6 from John David Anglin danglin at gcc dot gnu.org 2012-03-11 23:59:26 UTC --- Test is xfailed on trunk. Please note that this is an optimization bug as the test doesn't fail at -O0. While struct T is packed, I don't believe that this implies that its address is misaligned. i is the first field in T. Thus, its address shouldn't be misaligned on a big endian target. Is that so? If so then the testcase is invalid.
[Bug middle-end/52450] FAIL: gcc.dg/torture/pr52402.c at -O1 and above
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 --- Comment #8 from rguenther at suse dot de rguenther at suse dot de 2012-03-12 09:58:02 UTC --- On Mon, 12 Mar 2012, rguenther at suse dot de wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 --- Comment #7 from rguenther at suse dot de rguenther at suse dot de 2012-03-12 09:55:54 UTC --- On Sun, 11 Mar 2012, danglin at gcc dot gnu.org wrote: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 John David Anglin danglin at gcc dot gnu.org changed: What|Removed |Added Component|target |middle-end --- Comment #6 from John David Anglin danglin at gcc dot gnu.org 2012-03-11 23:59:26 UTC --- Test is xfailed on trunk. Please note that this is an optimization bug as the test doesn't fail at -O0. While struct T is packed, I don't believe that this implies that its address is misaligned. i is the first field in T. Thus, its address shouldn't be misaligned on a big endian target. Is that so? If so then the testcase is invalid. Btw, alignof () of a packed struct type is 1 (it could be nested in another packed struct). Richard.
[Bug middle-end/52450] FAIL: gcc.dg/torture/pr52402.c at -O1 and above
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 --- Comment #9 from John David Anglin danglin at gcc dot gnu.org 2012-03-12 15:33:38 UTC --- Author: danglin Date: Mon Mar 12 15:33:32 2012 New Revision: 185239 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=185239 Log: PR target/52450 * gcc.dg/torture/pr52402.c: Skip execution on 32-bit hppa*-*-hpux*. Modified: branches/gcc-4_7-branch/gcc/testsuite/ChangeLog branches/gcc-4_7-branch/gcc/testsuite/gcc.dg/torture/pr52402.c
[Bug middle-end/52450] FAIL: gcc.dg/torture/pr52402.c at -O1 and above
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 --- Comment #10 from dave.anglin at bell dot net 2012-03-12 22:13:55 UTC --- On 12-Mar-12, at 5:55 AM, rguenther at suse dot de wrote: Is that so? If so then the testcase is invalid. I had wondered about that, but packed is a GCC extension, and it seems the middle at least initially generates a copy to align T. I'll look at it some more when I get a chance. -- John David Anglindave.ang...@bell.net
[Bug middle-end/52450] FAIL: gcc.dg/torture/pr52402.c at -O1 and above
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52450 John David Anglin danglin at gcc dot gnu.org changed: What|Removed |Added Component|target |middle-end --- Comment #6 from John David Anglin danglin at gcc dot gnu.org 2012-03-11 23:59:26 UTC --- Test is xfailed on trunk. Please note that this is an optimization bug as the test doesn't fail at -O0. While struct T is packed, I don't believe that this implies that its address is misaligned. i is the first field in T. Thus, its address shouldn't be misaligned on a big endian target. It would seem that the problem is the copy at the caller site is being optimized away.