Bug 42718 - FAIL: gcc.c-torture/compile/pr42559.c at -O1 and above
Summary: FAIL: gcc.c-torture/compile/pr42559.c at -O1 and above
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.4.3
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-12 21:44 UTC by John David Anglin
Modified: 2010-03-22 01:29 UTC (History)
1 user (show)

See Also:
Host: hppa*-*-hpux*
Target: hppa*-*-hpux*
Build: hppa*-*-hpux*
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2010-01-12 21:44:54 UTC
Executing on host: /mnt/gnu/gcc/objdir/gcc/xgcc -B/mnt/gnu/gcc/objdir/gcc/   -O1
  -w -c  -o pr42559.o /mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr425
59.c    (timeout = 300)
/mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr42559.c: In function 'jum
pfunc':
/mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr42559.c:5: internal compi
ler error: Arithmetic exception

Program received signal SIGFPE, Arithmetic exception.
0x00031080 in small_divisor ()
(gdb) bt
#0  0x00031080 in small_divisor ()
#1  0x00a3410c in gen_movmemsi (operand0=0x7afaee50, operand1=0x7afaee60,
    operand2=0x7af33550, operand3=0x7af332b8)
    at ../../gcc/gcc/config/pa/pa.md:3554
#2  0x0038bbcc in emit_block_move_via_movmem (x=0x7afaee50, y=0x7afaee60,
    size=0x7af33550, align=1, expected_align=8, expected_size=-1)
    at ../../gcc/gcc/expr.c:1360
#3  0x0038b768 in emit_block_move_hints (x=0x7afaee50, y=0x7afaee60,
    size=0x7af33550, method=BLOCK_OP_NORMAL, expected_align=8,
    expected_size=-1) at ../../gcc/gcc/expr.c:1233
...

Problem is alignment.

I believe that this was fixed on trunk by the following change:

2009-12-17  Richard Guenther  <rguenther@suse.de>

        PR middle-end/42397
        * builtins.c (get_object_alignment): Properly deal with
        a CONST_DECL base.
        * expr.c (emit_block_move_hints): Assert the alignment makes sense.
Comment 1 John David Anglin 2010-03-07 20:13:23 UTC
Unfortunately, we still get the following after back porting the above
change:

Executing on host: /mnt/gnu/gcc/objdir/gcc/xgcc -B/mnt/gnu/gcc/objdir/gcc/   -O1  -w -c  -o pr42559.o /mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr42559.c    (timeout = 300)/mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr42559.c: In function 'jumpfunc':^M
/mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr42559.c:5: internal compiler error: in emit_block_move_hints, at expr.c:1208^M
Comment 2 John David Anglin 2010-03-07 21:44:32 UTC
Breakpoint 1, get_object_alignment (exp=0x7afb80f0, align=8, max_align=64)
    at ../../gcc/gcc/builtins.c:320
320       if (TREE_CODE (exp) == CONST_DECL)
(gdb) p debug_tree (exp)
 <label_decl 7afb80f0 jumplabel
    type <void_type 7af43270 void VOID
        align 8 symtab 0 alias set -1 canonical type 7af43270
        pointer_to_this <pointer_type 7af432d8>>
    side-effects VOID file /mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr42559.c line 6 col 1
    align 1 alias set 2 context <function_decl 7afad500 jumpfunc> initial <error_mark 7af2f340>
    (code_label/s 8 7 9 3 ("jumplabel") [0 uses])

(note 9 8 0 [bb 3] NOTE_INSN_BASIC_BLOCK)
>
$5 = void
Comment 3 John David Anglin 2010-03-22 01:00:54 UTC
Subject: Bug 42718

Author: danglin
Date: Mon Mar 22 01:00:30 2010
New Revision: 157614

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157614
Log:
	PR middle-end/42718
	* pa.md (movmemsi): Set align to one if zero.
	(movmemdi): Likewise.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/pa/pa.md

Comment 4 John David Anglin 2010-03-22 01:03:00 UTC
Subject: Bug 42718

Author: danglin
Date: Mon Mar 22 01:02:42 2010
New Revision: 157615

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157615
Log:
	PR middle-end/42718
	* pa.md (movmemsi): Set align to one if zero.
	(movmemdi): Likewise.


Modified:
    branches/gcc-4_4-branch/gcc/ChangeLog
    branches/gcc-4_4-branch/gcc/config/pa/pa.md

Comment 5 John David Anglin 2010-03-22 01:05:38 UTC
Subject: Bug 42718

Author: danglin
Date: Mon Mar 22 01:05:19 2010
New Revision: 157616

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157616
Log:
	PR middle-end/42718
	* pa.md (movmemsi): Set align to one if zero.
	(movmemdi): Likewise.


Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/config/pa/pa.md

Comment 6 John David Anglin 2010-03-22 01:29:55 UTC
Failure is avoided in back-end but middle-end problem remains.