public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/43557] New: ICE with -combine and -g
@ 2010-03-28 17:29 kevin at koconnor dot net
2010-03-28 20:23 ` [Bug c/43557] " ubizjak at gmail dot com
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: kevin at koconnor dot net @ 2010-03-28 17:29 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1482 bytes --]
The following causes an ICE with latest gcc 4.5.0 (svn r157452):
============================================================
cat > file1.c << EOF
struct s1_s {
int v;
};
struct s1_s g1;
void __attribute__((externally_visible)) func1() {
struct s1_s *l1 = &g1;
l1->v = 0;
}
EOF
cat > file2.c << EOF
extern struct s1_s g1;
void func2() {
&g1;
}
EOF
cc -O -g -fwhole-program -combine -c file1.c file2.c
============================================================
This appears similar to pr41893.
$ ~/src/gcc/install/bin/gcc -O -g -fwhole-program -combine -c file1.c file2.c
file1.c: In function âfunc1â:
file1.c:5:42: internal compiler error: in simplify_subreg, at
simplify-rtx.c:5139
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
$ ~/src/gcc/install/bin/gcc --version
gcc (GCC) 4.5.0 20100315 (experimental)
Copyright (C) 2010 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Summary: ICE with -combine and -g
Product: gcc
Version: 4.5.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: kevin at koconnor dot net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/43557] ICE with -combine and -g
2010-03-28 17:29 [Bug c/43557] New: ICE with -combine and -g kevin at koconnor dot net
@ 2010-03-28 20:23 ` ubizjak at gmail dot com
2010-03-28 20:36 ` ubizjak at gmail dot com
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2010-03-28 20:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from ubizjak at gmail dot com 2010-03-28 20:22 -------
Confirmed with "cc1 -O -g -fwhole-program file1.c file2.c"
#0 fancy_abort (file=0xd4a558 "../../gcc-svn/trunk/gcc/simplify-rtx.c",
line=5135, function=0xd4b590 "simplify_subreg")
at ../../gcc-svn/trunk/gcc/diagnostic.c:762
#1 0x000000000079ec50 in simplify_subreg (outermode=VOIDmode,
op=0x7ffff1f59918, innermode=SImode, byte=0)
at ../../gcc-svn/trunk/gcc/simplify-rtx.c:5135
#2 0x000000000079ee9e in simplify_gen_subreg (outermode=VOIDmode,
op=0x7ffff1f59918, innermode=SImode, byte=0)
at ../../gcc-svn/trunk/gcc/simplify-rtx.c:5449
#3 0x000000000055ca74 in expand_debug_expr (exp=0x7ffff1f10000)
at ../../gcc-svn/trunk/gcc/cfgexpand.c:2416
#4 0x000000000055b503 in expand_debug_expr (exp=0x7ffff1f57510)
at ../../gcc-svn/trunk/gcc/cfgexpand.c:2882
#5 0x000000000055b02c in expand_debug_expr (exp=0x7ffff1f575a0)
at ../../gcc-svn/trunk/gcc/cfgexpand.c:2273
#6 0x000000000055b37f in expand_debug_expr (exp=0x7ffff1ef6318)
at ../../gcc-svn/trunk/gcc/cfgexpand.c:2938
#7 0x000000000055ebd5 in expand_debug_locations ()
at ../../gcc-svn/trunk/gcc/cfgexpand.c:3072
#8 gimple_expand_cfg () at ../../gcc-svn/trunk/gcc/cfgexpand.c:3834
#9 0x000000000071273b in execute_one_pass (pass=0x1154a20)
at ../../gcc-svn/trunk/gcc/passes.c:1567
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-03-28 20:22:55
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c/43557] ICE with -combine and -g
2010-03-28 17:29 [Bug c/43557] New: ICE with -combine and -g kevin at koconnor dot net
2010-03-28 20:23 ` [Bug c/43557] " ubizjak at gmail dot com
@ 2010-03-28 20:36 ` ubizjak at gmail dot com
2010-03-30 15:47 ` [Bug debug/43557] " jakub at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: ubizjak at gmail dot com @ 2010-03-28 20:36 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from ubizjak at gmail dot com 2010-03-28 20:35 -------
simplify_gen_subreg is called with VOIDmode outermode.
(gdb) f 3
#3 0x000000000055ca74 in expand_debug_expr (exp=0x7ffff1f10000)
at ../../gcc-svn/trunk/gcc/cfgexpand.c:2416
2416 op0 = simplify_gen_subreg (mode, op0, inner_mode,
(gdb) p mode
$8 = VOIDmode
Adding CC.
--
ubizjak at gmail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/43557] ICE with -combine and -g
2010-03-28 17:29 [Bug c/43557] New: ICE with -combine and -g kevin at koconnor dot net
2010-03-28 20:23 ` [Bug c/43557] " ubizjak at gmail dot com
2010-03-28 20:36 ` ubizjak at gmail dot com
@ 2010-03-30 15:47 ` jakub at gcc dot gnu dot org
2010-03-31 8:40 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-30 15:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jakub at gcc dot gnu dot org 2010-03-30 15:47 -------
Created an attachment (id=20259)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20259&action=view)
gcc45-pr43557.patch
This is a --combine mode bug, the type definitely shouldn't be incomplete just
because it has been incomplete in another TU, but it doesn't hurt if
expand_debug_expr is more robust.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/43557] ICE with -combine and -g
2010-03-28 17:29 [Bug c/43557] New: ICE with -combine and -g kevin at koconnor dot net
` (2 preceding siblings ...)
2010-03-30 15:47 ` [Bug debug/43557] " jakub at gcc dot gnu dot org
@ 2010-03-31 8:40 ` jakub at gcc dot gnu dot org
2010-03-31 8:54 ` jakub at gcc dot gnu dot org
2010-04-04 3:50 ` kevin at koconnor dot net
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-31 8:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jakub at gcc dot gnu dot org 2010-03-31 08:39 -------
Subject: Bug 43557
Author: jakub
Date: Wed Mar 31 08:39:22 2010
New Revision: 157852
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=157852
Log:
PR debug/43557
* cfgexpand.c (expand_debug_expr): Handle VOIDmode mode like
BLKmode.
* gcc.dg/pr43557-1.c: New test.
* gcc.dg/pr43557-2.c: New file.
Added:
trunk/gcc/testsuite/gcc.dg/pr43557-1.c
trunk/gcc/testsuite/gcc.dg/pr43557-2.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cfgexpand.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/43557] ICE with -combine and -g
2010-03-28 17:29 [Bug c/43557] New: ICE with -combine and -g kevin at koconnor dot net
` (3 preceding siblings ...)
2010-03-31 8:40 ` jakub at gcc dot gnu dot org
@ 2010-03-31 8:54 ` jakub at gcc dot gnu dot org
2010-04-04 3:50 ` kevin at koconnor dot net
5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu dot org @ 2010-03-31 8:54 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jakub at gcc dot gnu dot org 2010-03-31 08:54 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43557
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug debug/43557] ICE with -combine and -g
2010-03-28 17:29 [Bug c/43557] New: ICE with -combine and -g kevin at koconnor dot net
` (4 preceding siblings ...)
2010-03-31 8:54 ` jakub at gcc dot gnu dot org
@ 2010-04-04 3:50 ` kevin at koconnor dot net
5 siblings, 0 replies; 7+ messages in thread
From: kevin at koconnor dot net @ 2010-04-04 3:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from kevin at koconnor dot net 2010-04-04 03:50 -------
I've confirmed this fix (r157942) works (both for the test case and for the
underlying program - SeaBIOS). SeaBIOS ( http://seabios.org/ ) does run into
pr39959, but using --enable-checking=release gets around that problem.
Thanks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43557
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2010-04-04 3:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-28 17:29 [Bug c/43557] New: ICE with -combine and -g kevin at koconnor dot net
2010-03-28 20:23 ` [Bug c/43557] " ubizjak at gmail dot com
2010-03-28 20:36 ` ubizjak at gmail dot com
2010-03-30 15:47 ` [Bug debug/43557] " jakub at gcc dot gnu dot org
2010-03-31 8:40 ` jakub at gcc dot gnu dot org
2010-03-31 8:54 ` jakub at gcc dot gnu dot org
2010-04-04 3:50 ` kevin at koconnor dot net
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).