Bug 33092 - [4.3 Regression] Using -O1 -fno-tree-salias results in ICE
Summary: [4.3 Regression] Using -O1 -fno-tree-salias results in ICE
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.3.0
: P2 normal
Target Milestone: 4.3.0
Assignee: Not yet assigned to anyone
Keywords: alias
: 33650 33681 (view as bug list)
Depends on:
Reported: 2007-08-16 16:01 UTC by Steve Ellcey
Modified: 2008-01-22 13:32 UTC (History)
5 users (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed: 2007-08-20 01:46:26

Patch adds a dummy pass, as discussed in comments (712 bytes, patch)
2007-11-19 13:46 UTC, Rob Quill
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Ellcey 2007-08-16 16:01:20 UTC
While turning off optimizations to try and track down a compiler bug I noticed that if I used -fno-tree-salias with -O1 the compiler would ICE:

x.c: In function 'main':
x.c:1: internal compiler error: in verify_curr_properties, at passes.c:1035
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

This can be reproduced by compiling any program with "-O1 -fno-tree-salias".
Comment 1 Daniel Berlin 2007-08-16 17:37:59 UTC
Subject: Re:  [4.3 Regrsssion] Using -O1 -fno-tree-salias results in ICE

Yeah, we either need to remove salias, or force create an empty
may_alias pass that returns TODO_may_alias but does nothing else.

I'm not sure which is the better option (I don't really see the point
of -fno-tree-salias, it would be like -fno-tree-call-cloberring)

On 16 Aug 2007 16:54:38 -0000, pinskia at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
> --
> pinskia at gcc dot gnu dot org changed:
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |dberlin at gcc dot gnu dot
>                    |                            |org
>             Summary|Using -O1 -fno-tree-salias  |[4.3 Regrsssion] Using -O1 -
>                    |results in ICE              |fno-tree-salias results in
>                    |                            |ICE
>    Target Milestone|---                         |4.3.0
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33092
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
Comment 2 Andrew Pinski 2007-08-20 01:46:26 UTC
Comment 3 Mark Mitchell 2007-09-05 01:31:22 UTC
I'm all for removing optimization options if we don't ever want to turn them off.  Fewer options would be better...
Comment 4 Andrew Pinski 2007-10-03 23:12:55 UTC
*** Bug 33650 has been marked as a duplicate of this bug. ***
Comment 5 Andrew Pinski 2007-10-06 21:22:53 UTC
*** Bug 33681 has been marked as a duplicate of this bug. ***
Comment 6 Rob Quill 2007-11-16 20:00:02 UTC
I'm working on adding a new pass for this.

Comment 7 Rob Quill 2007-11-17 19:27:24 UTC
I believe I have this done, just checking there are no regressions.

Comment 8 Rob Quill 2007-11-19 13:46:34 UTC
Created attachment 14581 [details]
Patch adds a dummy pass, as discussed in comments

Patch attached, no regressions on x86_64.
Comment 9 Manuel López-Ibáñez 2008-01-22 13:28:40 UTC
Subject: Bug 33092

Author: manu
Date: Tue Jan 22 13:27:52 2008
New Revision: 131717

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131717
2008-01-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR middle-end/33092
	* tree-pass.h (pass_build_alias): New pass.
	* tree-ssa-alias.c (gate_build_alias): New.
	(pass_build_alias): New.
	* passes.c (init_optimization_passes): Add pass_build_alias after

	* gcc.dg/pr33092.c: New.


Comment 10 Manuel López-Ibáñez 2008-01-22 13:29:43 UTC
Fixed for GCC 4.3
Comment 11 Manuel López-Ibáñez 2008-01-22 13:32:44 UTC

I just noticed that you proposed a patch and got no answer. I am sorry for that. Patches should be sent to gcc-patches@gcc.gnu.org. Even that does not ensure that it will get noticed. If after one week or two nobody gives any reply, it is fairly common to "ping" the patch from time to time, so it doesn't get lost. We used to have a patch queue but it is down right now.
Comment 12 Manuel López-Ibáñez 2008-01-22 14:17:47 UTC
Subject: Bug 33092

Author: manu
Date: Tue Jan 22 14:17:00 2008
New Revision: 131721

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131721
Missed testcase in earlier commit.

2008-01-22  Manuel Lopez-Ibanez  <manu@gcc.gnu.org>

	PR middle-end/33092
	* gcc.dg/pr33092.c: New.