public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/33472] New: ICE and invalid rtl sharing on x86_64-mingw cross-compiler
@ 2007-09-18 12:43 fxcoudert at gcc dot gnu dot org
2007-09-20 17:46 ` [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw fxcoudert at gcc dot gnu dot org
` (6 more replies)
0 siblings, 7 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-18 12:43 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3621 bytes --]
This bug happens on a cross-compiler targetting x86_64-pc-mingw32, but not on a
native x86_64-linux compiler. Both compilers are built with SVN trunk from the
same revision (128540).
Witn -m64, it doesn't error out at -O0, there is an ICE at -O1 and a different
error at -O2. With -m32, compilation seems fine in all cases.
$ cat foo.c
_Complex float
product_c4 (_Complex float *src)
{
_Complex float res;
int n;
res = 1;
for (n = 0; n < 10; n++)
res *= src[n];
return res;
}
$ ./gcc/cc1 -O0 -std=c99 -quiet foo.c -m64
$ ./gcc/cc1 -O1 -std=c99 -quiet foo.c -m64
foo.c: In function product_c4:
foo.c:11: internal compiler error: in reg_overlap_mentioned_p, at
rtlanal.c:1398
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ ./gcc/cc1 -O2 -std=c99 -quiet foo.c -m64
foo.c: In function product_c4:
foo.c:11: error: invalid rtl sharing found in the insn
(insn 114 113 115 2 foo.c:9 (set (subreg:DI (reg:SC 92) 0)
(reg:DI 133)) -1 (nil))
foo.c:11: error: shared rtx
(subreg:DI (reg:SC 92) 0)
foo.c:11: internal compiler error: internal consistency failure
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
My cross-compiler is:
$ ./gcc/xgcc -v
Using built-in specs.
Target: x86_64-pc-mingw32
Configured with: /home/fxcoudert/devel/trunk/configure
--prefix=/home/fxcoudert/mingw64-cross/install --target=x86_64-pc-mingw32
--enable-languages=c,fortran --disable-werror --with-gmp=/home/fxcoudert/local
Thread model: win32
gcc version 4.3.0 20070917 (experimental) [trunk revision 128540] (GCC)
The backtrace for the ICE at -O1 is:
#0 fancy_abort (file=0xb7d6e0 "/home/fxcoudert/devel/trunk/gcc/rtlanal.c",
line=1398, function=0xb7d670 "reg_overlap_mentioned_p")
at /home/fxcoudert/devel/trunk/gcc/diagnostic.c:654
#1 0x000000000067a8e9 in reg_overlap_mentioned_p (x=0x2b4d7a1fd180,
in=0x2b4d7a1fa740) at /home/fxcoudert/devel/trunk/gcc/rtlanal.c:1398
#2 0x000000000067ac70 in reg_used_between_p (reg=0x2b4d7a1fd180,
from_insn=<value optimized out>, to_insn=0xb7d670)
at /home/fxcoudert/devel/trunk/gcc/rtlanal.c:721
#3 0x0000000000a0ec1e in can_combine_p (insn=0x2b4d7a1fe050,
i3=0x2b4d7a1f29b0, pred=<value optimized out>, succ=0x2b4d7a1f2f50,
pdest=0x7fff30e85460, psrc=0x7fff30e85458)
at /home/fxcoudert/devel/trunk/gcc/combine.c:1605
#4 0x0000000000a15d18 in try_combine (i3=0x2b4d7a1f29b0,
i2=<value optimized out>, i1=0x2b4d7a1fe050,
new_direct_jump_p=0x7fff30e854f4)
at /home/fxcoudert/devel/trunk/gcc/combine.c:2481
#5 0x0000000000a1a09d in rest_of_handle_combine ()
at /home/fxcoudert/devel/trunk/gcc/combine.c:1152
I can investigate further if need be, tell me what to do. If you have access to
the GCC compiler farm, my build is available in
/home/fxcoudert/mingw64-cross/ibin
PS: the reason I found this bug is that it shows up while building libgfortran
for this cross-compiler :(
--
Summary: ICE and invalid rtl sharing on x86_64-mingw cross-
compiler
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33472
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw
2007-09-18 12:43 [Bug middle-end/33472] New: ICE and invalid rtl sharing on x86_64-mingw cross-compiler fxcoudert at gcc dot gnu dot org
@ 2007-09-20 17:46 ` fxcoudert at gcc dot gnu dot org
2007-09-20 17:49 ` fxcoudert at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-20 17:46 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from fxcoudert at gcc dot gnu dot org 2007-09-20 17:46 -------
I also see it on a cross-compiler build = host = i386-pc-mingw32, target =
x86_64-pc-mingw32 (trunk revision 128622). It is triggered by most complex
routines in libgfortran.
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet|x86_64-linux-gnu |
GCC host triplet|x86_64-linux-gnu |
Summary|ICE and invalid rtl sharing |ICE and invalid rtl sharing
|on x86_64-mingw cross- |with complex on x86_64-mingw
|compiler |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33472
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw
2007-09-18 12:43 [Bug middle-end/33472] New: ICE and invalid rtl sharing on x86_64-mingw cross-compiler fxcoudert at gcc dot gnu dot org
2007-09-20 17:46 ` [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw fxcoudert at gcc dot gnu dot org
@ 2007-09-20 17:49 ` fxcoudert at gcc dot gnu dot org
2007-09-20 17:50 ` fxcoudert at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-20 17:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from fxcoudert at gcc dot gnu dot org 2007-09-20 17:49 -------
Created an attachment (id=14233)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14233&action=view)
Tree dumps for the reduced testcase
Attached are the tree dumps at optimisation levels -O0 (a_O0.c.* files), -O1
(a_O1.c.* files) and -O2 (a_O2.c.* files). See initial report for error
messages and ICE backtrace.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33472
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw
2007-09-18 12:43 [Bug middle-end/33472] New: ICE and invalid rtl sharing on x86_64-mingw cross-compiler fxcoudert at gcc dot gnu dot org
2007-09-20 17:46 ` [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw fxcoudert at gcc dot gnu dot org
2007-09-20 17:49 ` fxcoudert at gcc dot gnu dot org
@ 2007-09-20 17:50 ` fxcoudert at gcc dot gnu dot org
2007-09-20 17:50 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-20 17:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fxcoudert at gcc dot gnu dot org 2007-09-20 17:50 -------
Created an attachment (id=14234)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=14234&action=view)
RTL dumps
The corresponding RTL dumps...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33472
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw
2007-09-18 12:43 [Bug middle-end/33472] New: ICE and invalid rtl sharing on x86_64-mingw cross-compiler fxcoudert at gcc dot gnu dot org
` (2 preceding siblings ...)
2007-09-20 17:50 ` fxcoudert at gcc dot gnu dot org
@ 2007-09-20 17:50 ` pinskia at gcc dot gnu dot org
2007-09-21 13:26 ` ktietz at onevision dot com
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-09-20 17:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2007-09-20 17:50 -------
Related to PR 33347.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33472
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw
2007-09-18 12:43 [Bug middle-end/33472] New: ICE and invalid rtl sharing on x86_64-mingw cross-compiler fxcoudert at gcc dot gnu dot org
` (3 preceding siblings ...)
2007-09-20 17:50 ` pinskia at gcc dot gnu dot org
@ 2007-09-21 13:26 ` ktietz at onevision dot com
2007-09-22 23:54 ` fxcoudert at gcc dot gnu dot org
2007-09-24 12:39 ` ubizjak at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: ktietz at onevision dot com @ 2007-09-21 13:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from ktietz at onevision dot com 2007-09-21 13:26 -------
The bug is related to i386.c function 'return_in_memory_ms_64':
The return statement of this function has to be extended by SCmode.
Patch looks like:
static int
return_in_memory_ms_64 (const_tree type, enum machine_mode mode)
{
HOST_WIDE_INT size = int_size_in_bytes (type);
/* __m128 and friends are returned in xmm0. */
if (size == 16 && VECTOR_MODE_P (mode))
return 0;
/* Otherwise, the size must be exactly in [1248]. */
- return (size != 1 && size != 2 && size != 4 && size != 8);
+ return (size != 1 && size != 2 && size != 4 && size != 8) || mode == SCmode;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33472
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw
2007-09-18 12:43 [Bug middle-end/33472] New: ICE and invalid rtl sharing on x86_64-mingw cross-compiler fxcoudert at gcc dot gnu dot org
` (4 preceding siblings ...)
2007-09-21 13:26 ` ktietz at onevision dot com
@ 2007-09-22 23:54 ` fxcoudert at gcc dot gnu dot org
2007-09-24 12:39 ` ubizjak at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-09-22 23:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from fxcoudert at gcc dot gnu dot org 2007-09-22 23:54 -------
*** Bug 33530 has been marked as a duplicate of this bug. ***
--
fxcoudert at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nightstrike at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33472
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw
2007-09-18 12:43 [Bug middle-end/33472] New: ICE and invalid rtl sharing on x86_64-mingw cross-compiler fxcoudert at gcc dot gnu dot org
` (5 preceding siblings ...)
2007-09-22 23:54 ` fxcoudert at gcc dot gnu dot org
@ 2007-09-24 12:39 ` ubizjak at gmail dot com
6 siblings, 0 replies; 8+ messages in thread
From: ubizjak at gmail dot com @ 2007-09-24 12:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from ubizjak at gmail dot com 2007-09-24 12:39 -------
Fixed by http://gcc.gnu.org/viewcvs?view=rev&revision=128710:
2007-09-24 Kai Tietz <kai.tietz@onevision.com>
PR middle-end/33472
* config/i386/i386.c (return_in_memory_ms_64): Handle return types for
complex types.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33472
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2007-09-24 12:39 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-18 12:43 [Bug middle-end/33472] New: ICE and invalid rtl sharing on x86_64-mingw cross-compiler fxcoudert at gcc dot gnu dot org
2007-09-20 17:46 ` [Bug middle-end/33472] ICE and invalid rtl sharing with complex on x86_64-mingw fxcoudert at gcc dot gnu dot org
2007-09-20 17:49 ` fxcoudert at gcc dot gnu dot org
2007-09-20 17:50 ` fxcoudert at gcc dot gnu dot org
2007-09-20 17:50 ` pinskia at gcc dot gnu dot org
2007-09-21 13:26 ` ktietz at onevision dot com
2007-09-22 23:54 ` fxcoudert at gcc dot gnu dot org
2007-09-24 12:39 ` ubizjak at gmail dot com
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).