Bug 33318 - [4.3 Regression] fortran/expr.c:305: internal compiler error: internal consistency failure
Summary: [4.3 Regression] fortran/expr.c:305: internal compiler error: internal consis...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
URL:
Keywords: build, ice-checking, ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-09-05 21:15 UTC by John David Anglin
Modified: 2007-10-10 23:01 UTC (History)
2 users (show)

See Also:
Host: hppa64-hp-hpux11.11
Target: hppa64-hp-hpux11.11
Build: hppa64-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed:


Attachments
fix (2.91 KB, patch)
2007-09-05 22:30 UTC, Jan Hubicka
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2007-09-05 21:15:53 UTC
/test/gnu/gcc/objdir/./prev-gcc/xgcc -B/test/gnu/gcc/objdir/./prev-gcc/ -B/opt/g
nu64/gcc/gcc-4.3.0/hppa64-hp-hpux11.11/bin/ -c   -g -O2 -DIN_GCC   -W -Wall -Wwr
ite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition -Wmi
ssing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
                     -Wno-overlength-strings -Werror -fno-common   -DHAVE_CONFIG
_H -I. -Ifortran -I../../gcc/gcc -I../../gcc/gcc/fortran -I../../gcc/gcc/../incl
ude -I../../gcc/gcc/../libcpp/include -I/opt/gnu64/gcc/gcc-4.3.0/include  -I../.
./gcc/gcc/../libdecnumber -I../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber
   ../../gcc/gcc/fortran/expr.c -o fortran/expr.o
../../gcc/gcc/fortran/expr.c: In function 'copy_ref':
../../gcc/gcc/fortran/expr.c:305: error: invalid rtl sharing found in the insn
(jump_insn 25 100 101 5 ../../gcc/gcc/fortran/expr.c:283 (set (pc)
        (if_then_else (eq (subreg/s/u:SI (reg:DI 71 [ D.8737 ]) 4)
                (const_int 0 [0x0]))
            (label_ref 29)
            (pc))) 46 {*pa.md:1770} (expr_list:REG_BR_PROB (const_int 5000 [0x13
88])
        (nil)))
../../gcc/gcc/fortran/expr.c:305: error: shared rtx
(subreg/s/u:SI (reg:DI 71 [ D.8737 ]) 4)
../../gcc/gcc/fortran/expr.c:305: internal compiler error: internal consistency
failure
Comment 1 Jan Hubicka 2007-09-05 22:30:03 UTC
Created attachment 14162 [details]
fix

does the attached patch fix the bootstrap problem?
Comment 2 John David Anglin 2007-09-06 13:30:28 UTC
No, cc1 is hanging in stage2.  I did a core dump:

Program terminated with signal 3, Quit.

warning: The shared libraries were not privately mapped; setting a
breakpoint in a shared library will not work until you rerun the program.

Reading symbols from /usr/lib/pa20_64/dld.sl...done.
Loaded symbols for /usr/lib/pa20_64/dld.sl
Reading symbols from /usr/lib/pa20_64/libc.2...done.
Loaded symbols for /lib/pa20_64/libc.2
Reading symbols from /usr/lib/pa20_64/libdl.1...done.
Loaded symbols for /usr/lib/pa20_64/libdl.1
Reading symbols from /opt/graphics/OpenGL/lib/pa20_64/libogltls.sl...done.
Loaded symbols for /opt/graphics/OpenGL/lib/pa20_64/libogltls.sl
#0  0x400000000042cc00 in verify_rtl_sharing ()
    at ../../gcc/gcc/emit-rtl.c:2382
2382        if (INSN_P (p))
Breakpoint 1 at 0x40000000003c94d4: file ../../gcc/gcc/diagnostic.c, line 655.
Breakpoint 2 at 0x40000000003c92b4: file ../../gcc/gcc/diagnostic.c, line 599.
Breakpoint 3 at 0xc00000000018662c
Breakpoint 4 at 0xc0000000001dea88
(gdb) bt
#0  0x400000000042cc00 in verify_rtl_sharing ()
    at ../../gcc/gcc/emit-rtl.c:2382
#1  0x4000000000d881bc in cse_insn (insn=0x800003fffd3f4320, libcall_insn=0x0)
    at ../../gcc/gcc/cse.c:4681
#2  0x4000000000d8ee6c in cse_extended_basic_block (
    ebb_data=0x800003fffdff3390) at ../../gcc/gcc/cse.c:6113
#3  0x4000000000d8f9e4 in cse_main (f=0x800003fffbd18100, nregs=10964)
    at ../../gcc/gcc/cse.c:6296
#4  0x4000000000d922ac in rest_of_handle_cse () at ../../gcc/gcc/cse.c:7031
#5  0x40000000006e5e08 in execute_one_pass (pass=0x8000000100005520)
    at ../../gcc/gcc/passes.c:1110
#6  0x40000000006e6130 in execute_pass_list (pass=0x8000000100005520)
    at ../../gcc/gcc/passes.c:1163
#7  0x40000000006e6174 in execute_pass_list (pass=0x8000000100002a18)
    at ../../gcc/gcc/passes.c:1164
#8  0x4000000000914cb0 in tree_rest_of_compilation (fndecl=0x800003fffd30d800)
    at ../../gcc/gcc/tree-optimize.c:404
#9  0x400000000023a24c in c_expand_body (fndecl=0x7000000000000)
    at ../../gcc/gcc/c-common.c:4586
#10 0x4000000000c3f698 in cgraph_expand_function (node=0x800003fffcc92200)
    at ../../gcc/gcc/cgraphunit.c:1077
#11 0x4000000000c3fa60 in cgraph_expand_all_functions ()
    at ../../gcc/gcc/cgraphunit.c:1146
---Type <return> to continue, or q <return> to quit---
#12 0x4000000000c406a8 in cgraph_optimize ()
    at ../../gcc/gcc/cgraphunit.c:1353
#13 0x400000000019d2bc in c_write_global_declarations ()
    at ../../gcc/gcc/c-decl.c:8080
#14 0x4000000000833588 in compile_file () at ../../gcc/gcc/toplev.c:1058
#15 0x4000000000837044 in do_compile () at ../../gcc/gcc/toplev.c:2229
#16 0x4000000000837160 in toplev_main (argc=43, argv=0x800003fffdff2278)
    at ../../gcc/gcc/toplev.c:2261
#17 0x40000000002a9380 in main (argc=458752, argv=0x923afafafaf)
    at ../../gcc/gcc/main.c:35
Comment 3 Jan Hubicka 2007-09-06 15:10:48 UTC
Subject: Bug 33318

Author: hubicka
Date: Thu Sep  6 15:10:28 2007
New Revision: 128187

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128187
Log:

	PR target/33318
	* cse.c (fold_rtx): Avoid invalid sharing.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/cse.c

Comment 4 Mark Mitchell 2007-10-10 17:53:49 UTC
Dave --

Is this fixed with Jan's patch?  If so, please close.

Thanks,

-- Mark
Comment 5 John David Anglin 2007-10-10 23:01:37 UTC
Fixed.