public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/24912]  New: m68k build failure: ICE: in reload_cse_simplify_operands
@ 2005-11-17 15:28 pbrook at gcc dot gnu dot org
  2005-11-17 15:36 ` [Bug rtl-optimization/24912] " joel at gcc dot gnu dot org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: pbrook at gcc dot gnu dot org @ 2005-11-17 15:28 UTC (permalink / raw)
  To: gcc-bugs

m68k-elf build fails building libiberty/regex.c.

Reduced testcase below:

void foo(void);
void
bar (unsigned char *p)
{
  int j;
  j = *(p) ;
  j += ((signed char) (*p) ) << 8;
  if (j)
    foo();
}

Compiled with m68-elf-gcc -O2 gives

test.c:10: error: insn does not satisfy its constraints:
(insn 40 16 41 0 (set (reg:SI 2 %d2)
        (sign_extend:SI (reg:HI 0 %d0 [34]))) 65 {*68k_extendhisi2} (nil)
    (nil))
test.c:10: internal compiler error: in reload_cse_simplify_operands, at
postreload.c:393

Appears to have been caused by r106804 (reverting this patch allows the build
to succeed):

2005-11-12  Hans-Peter Nilsson  <hp@axis.com>

       PR middle-end/24750
       * reload.c (find_reloads_address_1) <case TRUNCATE, SIGN_EXTEND,
       ZERO_EXTEND>: New cases.


-- 
           Summary: m68k build failure: ICE: in reload_cse_simplify_operands
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: hp at gcc dot gnu dot org
        ReportedBy: pbrook at gcc dot gnu dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: m68k-elf


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug rtl-optimization/24912] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
@ 2005-11-17 15:36 ` joel at gcc dot gnu dot org
  2005-11-17 16:26 ` hp at gcc dot gnu dot org
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: joel at gcc dot gnu dot org @ 2005-11-17 15:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from joel at gcc dot gnu dot org  2005-11-17 15:36 -------
Also fails building m68k-rtems4.7.


-- 

joel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joel at gcc dot gnu dot org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-17 15:36:02
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug rtl-optimization/24912] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
  2005-11-17 15:36 ` [Bug rtl-optimization/24912] " joel at gcc dot gnu dot org
@ 2005-11-17 16:26 ` hp at gcc dot gnu dot org
  2005-11-17 17:59 ` joel at gcc dot gnu dot org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-11-17 16:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hp at gcc dot gnu dot org  2005-11-17 16:26 -------
Confirmed with r107118.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug rtl-optimization/24912] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
  2005-11-17 15:36 ` [Bug rtl-optimization/24912] " joel at gcc dot gnu dot org
  2005-11-17 16:26 ` hp at gcc dot gnu dot org
@ 2005-11-17 17:59 ` joel at gcc dot gnu dot org
  2005-11-17 22:59 ` [Bug middle-end/24912] " hp at gcc dot gnu dot org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: joel at gcc dot gnu dot org @ 2005-11-17 17:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from joel at gcc dot gnu dot org  2005-11-17 17:59 -------
Created an attachment (id=10265)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10265&action=view)
Preprocessed file that produces ICE

This is the command line which produces the ICE.  I changed -c to -E to produce
the attached file.

/home/joel/gcc-work/head/b-m68k-rtems4.7/./gcc/xgcc
-B/home/joel/gcc-work/head/b-m68k-rtems4.7/./gcc/ -nostdinc
-B/home/joel/gcc-work/head/b-m68k-rtems4.7/m68k-rtems4.7/newlib/ -isystem
/home/joel/gcc-work/head/b-m68k-rtems4.7/m68k-rtems4.7/newlib/targ-include
-isystem /home/joel/gcc-work/head/gcc-head-test/newlib/libc/include
-B/home/joel/gcc-41-test//m68k-rtems4.7/bin/
-B/home/joel/gcc-41-test//m68k-rtems4.7/lib/ -isystem
/home/joel/gcc-41-test//m68k-rtems4.7/include -isystem
/home/joel/gcc-41-test//m68k-rtems4.7/sys-include -c -DHAVE_CONFIG_H -O2 -g -O2
 -I. -I../../../gcc-head-test/libiberty/../include  -W -Wall -pedantic
-Wwrite-strings -Wstrict-prototypes ../../../gcc-head-test/libiberty/regex.c -c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2005-11-17 17:59 ` joel at gcc dot gnu dot org
@ 2005-11-17 22:59 ` hp at gcc dot gnu dot org
  2005-11-18  2:03 ` hp at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-11-17 22:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hp at gcc dot gnu dot org  2005-11-17 22:59 -------
Reload is middle-end, not rtl-optimization.


-- 

hp at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|rtl-optimization            |middle-end


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2005-11-17 22:59 ` [Bug middle-end/24912] " hp at gcc dot gnu dot org
@ 2005-11-18  2:03 ` hp at gcc dot gnu dot org
  2005-11-18 20:08 ` hp at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-11-18  2:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hp at gcc dot gnu dot org  2005-11-18 02:03 -------
I have a patch under test.  However, with and without that patch, *and* with
and without r106804 (only with-with and without-without combinations tested),
I still get with r107118 when building libgfortran:

/home/hp/combined/m68k-elf/./gcc/xgcc -B/home/hp/combined/m68k-elf/./gcc/
-nostdinc -B/home/hp/combined/m68k-elf/m68k-elf/newlib/\
 -isystem /home/hp/combined/m68k-elf/m68k-elf/newlib/targ-include -isystem
/home/hp/combined/combined/newlib/libc/include -B/usr/\
local/m68k-elf/bin/ -B/usr/local/m68k-elf/lib/ -isystem
/usr/local/m68k-elf/include -isystem /usr/local/m68k-elf/sys-include -L/h\
ome/hp/combined/m68k-elf/./ld -DHAVE_CONFIG_H -I.
-I/home/hp/combined/combined/libgfortran -I.
-iquote/home/hp/combined/combined/\
libgfortran/io -std=gnu99 -Wall -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wextra -Wwrite-strings -O2 -g -O\
2 -c /home/hp/combined/combined/libgfortran/intrinsics/stat.c -o stat.o
/home/hp/combined/combined/libgfortran/intrinsics/stat.c: In function
'fstat_i8_sub':
/home/hp/combined/combined/libgfortran/intrinsics/stat.c:448: error:
unrecognizable insn:
(insn 83 82 84 10 /home/hp/combined/combined/libgfortran/intrinsics/stat.c:401
(set (mem:DI (plus:SI (reg:SI 46)
                (reg:SI 34 [ D.3918 ])) [2 S8 A16])
        (zero_extend:DI (mem/s/c:SI (plus:SI (reg/f:SI 26 virtual-stack-vars)
                    (const_int -56 [0xffffffc8])) [3 sb.st_mode+0 S4 A16]))) -1
(nil)
    (nil))
/home/hp/combined/combined/libgfortran/intrinsics/stat.c:448: internal compiler
error: in extract_insn, at recog.c:2084

I'm restarting a build without libgfortran.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2005-11-18  2:03 ` hp at gcc dot gnu dot org
@ 2005-11-18 20:08 ` hp at gcc dot gnu dot org
  2005-11-19 20:48 ` kazu at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-11-18 20:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from hp at gcc dot gnu dot org  2005-11-18 20:08 -------
Patch at <URL:http://gcc.gnu.org/ml/gcc-patches/2005-11/msg01373.html>.


-- 

hp at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Keywords|                            |patch
   Last reconfirmed|2005-11-17 15:36:02         |2005-11-18 20:08:40
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2005-11-18 20:08 ` hp at gcc dot gnu dot org
@ 2005-11-19 20:48 ` kazu at gcc dot gnu dot org
  2005-11-19 20:49 ` [Bug middle-end/24912] [4.1, 4.2 Regression] " kazu at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: kazu at gcc dot gnu dot org @ 2005-11-19 20:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from kazu at gcc dot gnu dot org  2005-11-19 20:48 -------
*** Bug 24850 has been marked as a duplicate of this bug. ***


-- 

kazu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-gcc at lists dot
                   |                            |debian dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] [4.1, 4.2 Regression] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2005-11-19 20:48 ` kazu at gcc dot gnu dot org
@ 2005-11-19 20:49 ` kazu at gcc dot gnu dot org
  2005-11-19 21:54 ` hp at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: kazu at gcc dot gnu dot org @ 2005-11-19 20:49 UTC (permalink / raw)
  To: gcc-bugs



-- 

kazu at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kazu at gcc dot gnu dot org
            Summary|m68k build failure: ICE: in |[4.1, 4.2 Regression] m68k
                   |reload_cse_simplify_operands|build failure: ICE: in
                   |                            |reload_cse_simplify_operands
   Target Milestone|---                         |4.2.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] [4.1, 4.2 Regression] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2005-11-19 20:49 ` [Bug middle-end/24912] [4.1, 4.2 Regression] " kazu at gcc dot gnu dot org
@ 2005-11-19 21:54 ` hp at gcc dot gnu dot org
  2005-11-19 21:56 ` hp at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-11-19 21:54 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from hp at gcc dot gnu dot org  2005-11-19 21:54 -------
Subject: Bug 24912

Author: hp
Date: Sat Nov 19 21:54:26 2005
New Revision: 107230

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107230
Log:
        PR middle-end/24912
        * gcc.dg/torture/pr24912-1.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr24912-1.c
Modified:
    trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] [4.1, 4.2 Regression] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2005-11-19 21:54 ` hp at gcc dot gnu dot org
@ 2005-11-19 21:56 ` hp at gcc dot gnu dot org
  2005-11-19 21:58 ` hp at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-11-19 21:56 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from hp at gcc dot gnu dot org  2005-11-19 21:56 -------
Subject: Bug 24912

Author: hp
Date: Sat Nov 19 21:56:17 2005
New Revision: 107231

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107231
Log:
        PR middle-end/24912
        PR middle-end/24750
        * reload.c (find_reloads_address_1): Mention dependency on
        gen_reload.
        * reload1.c (gen_reload): For IN with an unary operation, try
        moving inner expression to OUT if trivial SET is not valid.
        Confirm that the result is valid.  Move common code block into...
        (emit_insn_if_valid_for_reload): New function.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/reload.c
    trunk/gcc/reload1.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] [4.1, 4.2 Regression] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2005-11-19 21:56 ` hp at gcc dot gnu dot org
@ 2005-11-19 21:58 ` hp at gcc dot gnu dot org
  2005-11-19 21:59 ` hp at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-11-19 21:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from hp at gcc dot gnu dot org  2005-11-19 21:58 -------
Subject: Bug 24912

Author: hp
Date: Sat Nov 19 21:58:23 2005
New Revision: 107232

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107232
Log:
        PR middle-end/24912
        * gcc.dg/torture/pr24912-1.c: New test.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/torture/pr24912-1.c
Modified:
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] [4.1, 4.2 Regression] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2005-11-19 21:58 ` hp at gcc dot gnu dot org
@ 2005-11-19 21:59 ` hp at gcc dot gnu dot org
  2005-11-21  1:28 ` [Bug middle-end/24912] [4.1/4.2 " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-11-19 21:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from hp at gcc dot gnu dot org  2005-11-19 21:59 -------
Subject: Bug 24912

Author: hp
Date: Sat Nov 19 21:59:48 2005
New Revision: 107233

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107233
Log:
        PR middle-end/24912
        PR middle-end/24750
        * reload.c (find_reloads_address_1): Mention dependency on
        gen_reload.
        * reload1.c (gen_reload): For IN with an unary operation, try
        moving inner expression to OUT if trivial SET is not valid.
        Confirm that the result is valid.  Move common code block into...
        (emit_insn_if_valid_for_reload): New function.

Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/reload.c
    branches/gcc-4_1-branch/gcc/reload1.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] [4.1/4.2 Regression] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (11 preceding siblings ...)
  2005-11-19 21:59 ` hp at gcc dot gnu dot org
@ 2005-11-21  1:28 ` pinskia at gcc dot gnu dot org
  2005-11-21  3:44 ` hp at gcc dot gnu dot org
  2006-01-31 16:28 ` amylaar at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-11-21  1:28 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.1, 4.2 Regression] m68k  |[4.1/4.2 Regression] m68k
                   |build failure: ICE: in      |build failure: ICE: in
                   |reload_cse_simplify_operands|reload_cse_simplify_operands
   Target Milestone|4.2.0                       |4.1.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] [4.1/4.2 Regression] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (12 preceding siblings ...)
  2005-11-21  1:28 ` [Bug middle-end/24912] [4.1/4.2 " pinskia at gcc dot gnu dot org
@ 2005-11-21  3:44 ` hp at gcc dot gnu dot org
  2006-01-31 16:28 ` amylaar at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: hp at gcc dot gnu dot org @ 2005-11-21  3:44 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from hp at gcc dot gnu dot org  2005-11-21 03:44 -------
Non-empty comment to appease bugzilla.


-- 

hp at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug middle-end/24912] [4.1/4.2 Regression] m68k build failure: ICE: in reload_cse_simplify_operands
  2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
                   ` (13 preceding siblings ...)
  2005-11-21  3:44 ` hp at gcc dot gnu dot org
@ 2006-01-31 16:28 ` amylaar at gcc dot gnu dot org
  14 siblings, 0 replies; 16+ messages in thread
From: amylaar at gcc dot gnu dot org @ 2006-01-31 16:28 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #13 from amylaar at gcc dot gnu dot org  2006-01-31 16:28 -------
(In reply to comment #9)
> Subject: Bug 24912
> 
> Author: hp
> Date: Sat Nov 19 21:56:17 2005
> New Revision: 107231
> 
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=107231
> Log:
>         PR middle-end/24912
>         PR middle-end/24750
>         * reload.c (find_reloads_address_1): Mention dependency on
>         gen_reload.
>         * reload1.c (gen_reload): For IN with an unary operation, try
>         moving inner expression to OUT if trivial SET is not valid.
>         Confirm that the result is valid.  Move common code block into...
>         (emit_insn_if_valid_for_reload): New function.
> 
> Modified:
>     trunk/gcc/ChangeLog
>     trunk/gcc/reload.c
>     trunk/gcc/reload1.c
> 

This patch is incorrect, and has caused PR middle-end/25335:

> +  insn = emit_insn (insn);
> +  code = recog_memoized (insn);

This test is not valid because subst_reload is called only after
emit_reload_insns.

> +      /* If that failed, move the inner operand to the reload
> +	 register, and try the same unop with the inner expression
> +	 replaced with the reload register.  */
> +      op1 = XEXP (in, 0);

This ignores any replacements scheduled for &XEXP (in, 0) .
As a result, addressing modes with side effects can be duplicated.

In the test case for middle-end/25335, the patch for middle-end/24750
has registered such a replacement.

A possible solution would be calling subst_reloads before emit_reload_insns,
although it will require careful checking if this will work properly for all
the things that subst_reload does.


-- 

amylaar at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |joern dot rennecke at st dot
                   |                            |com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24912


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2006-01-31 16:28 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-17 15:28 [Bug rtl-optimization/24912] New: m68k build failure: ICE: in reload_cse_simplify_operands pbrook at gcc dot gnu dot org
2005-11-17 15:36 ` [Bug rtl-optimization/24912] " joel at gcc dot gnu dot org
2005-11-17 16:26 ` hp at gcc dot gnu dot org
2005-11-17 17:59 ` joel at gcc dot gnu dot org
2005-11-17 22:59 ` [Bug middle-end/24912] " hp at gcc dot gnu dot org
2005-11-18  2:03 ` hp at gcc dot gnu dot org
2005-11-18 20:08 ` hp at gcc dot gnu dot org
2005-11-19 20:48 ` kazu at gcc dot gnu dot org
2005-11-19 20:49 ` [Bug middle-end/24912] [4.1, 4.2 Regression] " kazu at gcc dot gnu dot org
2005-11-19 21:54 ` hp at gcc dot gnu dot org
2005-11-19 21:56 ` hp at gcc dot gnu dot org
2005-11-19 21:58 ` hp at gcc dot gnu dot org
2005-11-19 21:59 ` hp at gcc dot gnu dot org
2005-11-21  1:28 ` [Bug middle-end/24912] [4.1/4.2 " pinskia at gcc dot gnu dot org
2005-11-21  3:44 ` hp at gcc dot gnu dot org
2006-01-31 16:28 ` amylaar at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).