Bug 56382

Summary: FAIL: gcc.c-torture/compile/pr55921.c (internal compiler error)
Product: gcc Reporter: John David Anglin <danglin>
Component: middle-endAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: P3    
Version: 4.8.0   
Target Milestone: ---   
Host: hppa64-hp-hpux11.11 Target: hppa64-hp-hpux11.11
Build: hppa64-hp-hpux11.11 Known to work:
Known to fail: Last reconfirmed:
Attachments: Patch
Patch

Description John David Anglin 2013-02-18 18:24:11 UTC
This is a problem extracting the first subreg from a SCmode value.  Thia
occurs during reload after the point where pseudos can be created but we
need a pseudo to extract the subreg.  The problem is SCmode is the same
size as DImode on this target, so the subreg can't be extracted by a move.

I marked this a middle-end bug as the documentation indicates that complex
values are handled by it.
Comment 1 John David Anglin 2013-02-18 18:34:54 UTC
Created attachment 29485 [details]
Patch

I tried the above changes to expmed.c but this
approach eventually reaches a gcc_unreacheable
dead end.
Comment 2 John David Anglin 2013-07-25 16:32:42 UTC
Executing on host: /mnt/gnu/gcc/objdir-test/gcc/xgcc -B/mnt/gnu/gcc/objdir-test/
gcc/  -fno-diagnostics-show-caret   -O0  -w -c  -o pr55921.o /mnt/gnu/gcc/gcc/gc
c/testsuite/gcc.c-torture/compile/pr55921.c    (timeout = 300)spawn /mnt/gnu/gcc/objdir-test/gcc/xgcc -B/mnt/gnu/gcc/objdir-test/gcc/ -fno-diagnostics-show-caret -O0 -w -c -o pr55921.o /mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-
torture/compile/pr55921.c/mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr55921.c: In function 'foo':
/mnt/gnu/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/pr55921.c:21:1: internal compiler error: in gen_reg_rtx, at emit-rtl.c:866
Comment 3 John David Anglin 2013-07-25 16:35:30 UTC
Created attachment 30555 [details]
Patch

Works for me.
Comment 4 Eric Botcazou 2013-09-02 16:19:23 UTC
Author: ebotcazou
Date: Mon Sep  2 16:19:20 2013
New Revision: 202179

URL: http://gcc.gnu.org/viewcvs?rev=202179&root=gcc&view=rev
Log:
	PR middle-end/56382
	* expr.c (emit_move_complex): Do not move complex FP values as parts if
	the source or the destination is a single hard register.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/expr.c
Comment 5 John David Anglin 2014-03-27 01:04:38 UTC
This is fixed for hppa on trunk but not 4.8 branch.

*** This bug has been marked as a duplicate of bug 55943 ***