public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/44988] New: [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1
@ 2010-07-19 13:32 zsojka at seznam dot cz
2010-07-19 13:33 ` [Bug rtl-optimization/44988] " zsojka at seznam dot cz
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-19 13:32 UTC (permalink / raw)
To: gcc-bugs
Command line:
$ gcc -O testcase.c
Compiler output:
$ gcc -O testcase.c
testcase.c: In function 'foo':
testcase.c:12:22: internal compiler error: in make_decl_rtl, at varasm.c:1344
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Tested revisions:
r162222 - crash
r161659 - crash
r161170 - OK
--
Summary: [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346
at -O1
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: rtl-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zsojka at seznam dot cz
GCC host triplet: x86_64-pc-linux-gnu
GCC target triplet: x86_64-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44988
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug rtl-optimization/44988] [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1
2010-07-19 13:32 [Bug rtl-optimization/44988] New: [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1 zsojka at seznam dot cz
@ 2010-07-19 13:33 ` zsojka at seznam dot cz
2010-07-19 14:43 ` [Bug tree-optimization/44988] " rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2010-07-19 13:33 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from zsojka at seznam dot cz 2010-07-19 13:33 -------
Created an attachment (id=21250)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21250&action=view)
reduced testcase (from iptraf sources)
Similiar to PR44941 testcase and reduced from the same file, this one doesn't
use empty structs.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44988
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/44988] [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1
2010-07-19 13:32 [Bug rtl-optimization/44988] New: [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1 zsojka at seznam dot cz
2010-07-19 13:33 ` [Bug rtl-optimization/44988] " zsojka at seznam dot cz
@ 2010-07-19 14:43 ` rguenth at gcc dot gnu dot org
2010-07-20 11:29 ` rguenth at gcc dot gnu dot org
2010-07-20 11:29 ` rguenth at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-19 14:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from rguenth at gcc dot gnu dot org 2010-07-19 14:43 -------
Ick. The problem is that with MEM_REF we now have local variables that
are is_gimple_reg () but not in SSA form.
void
foo (void)
{
int i = 0;
bar (*(struct S *) &i);
}
is undefined and thus we remove the initializer and expand from
foo ()
{
int i;
# BLOCK 2 freq:10000
# PRED: ENTRY [100.0%] (fallthru,exec)
bar (MEM[(struct S *)&i]);
return;
# SUCC: EXIT [100.0%]
}
where when processing the remaining local decls we stop processing 'i' at
/* Expanded above already. */
if (is_gimple_reg (var))
{
TREE_USED (var) = 0;
goto next;
}
the issue is probably latent on the 4.5 branch if we manage to end up with
bar (VIEW_CONVERT <struct S>(i));
instead.
We could rewrite i into SSA form but would have troubles with even more
undefined code which would require a VIEW_CONVERT_EXPR to a different
sized object (which we now reject during gimple validation - the
view-converted use is the reason we don't rewrite it in the first place).
Another long-standing idea was to extend the use of DECL_GIMPLE_REG_P
to all variables (including those that are always registers). That
enables a check for whether a variable is in SSA form.
OTOH update-address-taken is to properly honor this and it does, it
is just missing handling of call arguments. I have a patch.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Component|rtl-optimization |tree-optimization
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2010-07-19 14:43:24
date| |
Target Milestone|--- |4.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44988
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/44988] [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1
2010-07-19 13:32 [Bug rtl-optimization/44988] New: [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1 zsojka at seznam dot cz
2010-07-19 13:33 ` [Bug rtl-optimization/44988] " zsojka at seznam dot cz
2010-07-19 14:43 ` [Bug tree-optimization/44988] " rguenth at gcc dot gnu dot org
@ 2010-07-20 11:29 ` rguenth at gcc dot gnu dot org
2010-07-20 11:29 ` rguenth at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-20 11:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from rguenth at gcc dot gnu dot org 2010-07-20 11:29 -------
Subject: Bug 44988
Author: rguenth
Date: Tue Jul 20 11:28:56 2010
New Revision: 162329
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=162329
Log:
2010-07-20 Richard Guenther <rguenther@suse.de>
PR middle-end/44971
PR middle-end/44988
* tree-ssa.c (maybe_optimize_var): New function split out from ...
(execute_update_addresses_taken): ... here.
(non_rewritable_mem_ref_base): Likewise.
(execute_update_addresses_taken): Do not iterate over all referenced
vars but just all local decls and parms.
Properly check call and asm arguments and rewrite call arguments.
* gcc.dg/pr44971.c: New testcase.
* gcc.c-torture/compile/pr44988.c: Likewise.
Added:
trunk/gcc/testsuite/gcc.c-torture/compile/pr44988.c
trunk/gcc/testsuite/gcc.dg/pr44971.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-ssa.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44988
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug tree-optimization/44988] [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1
2010-07-19 13:32 [Bug rtl-optimization/44988] New: [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1 zsojka at seznam dot cz
` (2 preceding siblings ...)
2010-07-20 11:29 ` rguenth at gcc dot gnu dot org
@ 2010-07-20 11:29 ` rguenth at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-20 11:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-07-20 11:29 -------
Fixed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44988
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-20 11:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-19 13:32 [Bug rtl-optimization/44988] New: [4.6 Regression] ICE: in make_decl_rtl, at varasm.c:1346 at -O1 zsojka at seznam dot cz
2010-07-19 13:33 ` [Bug rtl-optimization/44988] " zsojka at seznam dot cz
2010-07-19 14:43 ` [Bug tree-optimization/44988] " rguenth at gcc dot gnu dot org
2010-07-20 11:29 ` rguenth at gcc dot gnu dot org
2010-07-20 11:29 ` rguenth 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).