Bug 26672 - [4.1/4.2 Regression] ICE in op_iter_init, triggered by printf->puts optimization
Summary: [4.1/4.2 Regression] ICE in op_iter_init, triggered by printf->puts optimization
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.1.1
: P3 normal
Target Milestone: 4.1.1
Assignee: Richard Biener
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2006-03-14 00:09 UTC by Debian GCC Maintainers
Modified: 2006-03-14 13:30 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-03-14 10:33:27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Debian GCC Maintainers 2006-03-14 00:09:18 UTC
[forwarded from http://bugs.debian.org/356231]

found in 4.1 and in 4.2.0 20060304
not found in 3.4, 4.0


falk@juist:/src/delta/bin% cat mini.c
int printf(const char *format, ...);
extern const char help_string[];
void app_opts(void) {
    printf("%s", help_string);
}
const char help_string[] = "foo\n";

falk@juist:/src/delta/bin% gcc -c mini.c
falk@juist:/src/delta/bin% gcc -c mini.c -O
mini.c: In function 'app_opts':
mini.c:6: internal compiler error: in op_iter_init, at tree-flow-inline.h:1036
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Andrew Pinski 2006-03-14 00:15:48 UTC
Hmm, The problem is really we are looking at the VOPS pre going into SSA in set_rhs.
That seems wrong.
Comment 2 Richard Biener 2006-03-14 10:33:27 UTC
Right.  I have a patch.
Comment 3 Richard Biener 2006-03-14 12:50:15 UTC
Subject: Bug 26672

Author: rguenth
Date: Tue Mar 14 12:50:10 2006
New Revision: 112050

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112050
Log:
2006-03-14  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/26672
	* tree-ssa-propagate.c (set_rhs): Don't walk DEFs if not in
	SSA form.

	* gcc.dg/torture/pr26672.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/torture/pr26672.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-propagate.c

Comment 4 Richard Biener 2006-03-14 13:30:16 UTC
Subject: Bug 26672

Author: rguenth
Date: Tue Mar 14 13:30:08 2006
New Revision: 112051

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=112051
Log:
2006-03-14  Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/26672
	* tree-ssa-propagate.c (set_rhs): Don't walk DEFs if not in
	SSA form.

	* gcc.dg/torture/pr26672.c: New testcase.

Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/torture/pr26672.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog
    branches/gcc-4_1-branch/gcc/tree-ssa-propagate.c

Comment 5 Richard Biener 2006-03-14 13:30:27 UTC
Fixed.
Comment 6 patchapp@dberlin.org 2006-03-14 14:56:06 UTC
Subject: Bug number PR26672

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-03/msg00841.html