[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #24 from mueller at gcc dot gnu dot org 2006-05-03 13:02 --- closing as fixed then. Thanks ! -- mueller at gcc dot gnu dot org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #25 from dberlin at gcc dot gnu dot org 2006-05-03 14:15 --- Subject: Re: [4.2 Regression] ICE in in add_virtual_operand On Wed, 2006-05-03 at 13:02 +, mueller at gcc dot gnu dot org wrote: --- Comment #24 from mueller at gcc dot gnu dot org 2006-05-03 13:02 --- closing as fixed then. Thanks ! Sorry about the delay in fixing this, i was changing jobs :) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #23 from dberlin at gcc dot gnu dot org 2006-05-03 03:19 --- Subject: Bug 26626 Author: dberlin Date: Wed May 3 03:19:22 2006 New Revision: 113493 URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=113493 Log: 2006-05-02 Daniel Berlin [EMAIL PROTECTED] Fix PR tree-optimization/26626 * tree-ssa-structalias.c (compute_points_to_sets): For now, solve always. * tree-ssa-operands.c (access_can_touch_variable): Allow typecasting through union pointers. Added: trunk/gcc/testsuite/gcc.c-torture/compile/pr26626.c Modified: trunk/gcc/ChangeLog trunk/gcc/tree-ssa-operands.c trunk/gcc/tree-ssa-structalias.c -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #21 from dberlin at gcc dot gnu dot org 2006-04-28 18:26 --- Subject: Bug 26626 Try this patch, it should work :) --- Comment #22 from dberlin at gcc dot gnu dot org 2006-04-28 18:26 --- Created an attachment (id=11345) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11345action=view) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #15 from fxcoudert at gcc dot gnu dot org 2006-04-27 13:14 --- (In reply to comment #11) The only solution in these cases it to remove the assert and let it generate bad code, but I want to fix other issues first before removing the assert. What's the status on this? It makes libgfortran build crash with a patch I'd like to submit. -- fxcoudert at gcc dot gnu dot org changed: What|Removed |Added CC||fxcoudert at gcc dot gnu dot ||org Last reconfirmed|2006-03-09 22:52:29 |2006-04-27 13:14:03 date|| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #16 from dberlin at gcc dot gnu dot org 2006-04-27 15:39 --- Subject: Re: [4.2 Regression] ICE in in add_virtual_operand What's the status on this? It makes libgfortran build crash with a patch I'd like to submit. Uh, okay, so, until someone debugs the other real problems this exposes, i'm not going to remove the assert. In particular, whenever that assert triggers, it's going to generate bad code because somebody somewhere (either user or compiler pass, it varies) has done something wrong. So if it's triggering during your libgfortran builds with a patch, you really need to examine where it's triggering. If it is triggering because there is a bare NMT there, then something has screwed up aliasing. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #17 from rguenth at gcc dot gnu dot org 2006-04-27 16:43 --- As followup to comment #9, copyprop propagates pretmp.23_2 into rv.0_1-d, and in may_propagate_copy we see that rv.0_1 has both an SMT and NMT associated with, while pretmp.23_2 has none of the two. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #18 from dberlin at gcc dot gnu dot org 2006-04-27 16:55 --- Subject: Re: [4.2 Regression] ICE in in add_virtual_operand On Thu, 2006-04-27 at 16:43 +, rguenth at gcc dot gnu dot org wrote: --- Comment #17 from rguenth at gcc dot gnu dot org 2006-04-27 16:43 --- As followup to comment #9, copyprop propagates pretmp.23_2 into rv.0_1-d, and in may_propagate_copy we see that rv.0_1 has both an SMT and NMT associated with, while pretmp.23_2 has none of the two. Except that may_alias is rerun right after PRE, so it should have the same symbols :) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #19 from rguenth at gcc dot gnu dot org 2006-04-27 16:56 --- This one ICEs the same way, already during the first copyprop pass: typedef union { int d; } U; int rv; void breakme() { U *rv0; U *pretmp = (U*)rv; rv0 = pretmp; rv0-d = 42; } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #20 from rguenth at gcc dot gnu dot org 2006-04-27 17:08 --- Happens with -O -quiet t.c -dumpbase t.c -fdump-tree-alias1-vops -fstrict-aliasing -fno-tree-fre -fno-tree-ccp -fdump-tree-all -fno-tree-dce -fno-tree-copyrename -fno-tree-salias and manually disabled forwprop. So that leaves may_alias and copyprop itself to blame. -fno-strict-aliasing fixes it, too. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #14 from pinskia at gcc dot gnu dot org 2006-04-10 16:35 --- *** Bug 27085 has been marked as a duplicate of this bug. *** -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||debian-gcc at lists dot ||debian dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #13 from fxcoudert at gcc dot gnu dot org 2006-04-02 13:09 --- Created an attachment (id=11185) -- (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11185action=view) Preprocessed source also causing the problem Humpf, this ICE (same backtrace) also happens when building libgfortran under certain (unusual) conditions (seems to be related to missing prototypes). Preprocessed source attached in case you want to give it a look. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #10 from mueller at gcc dot gnu dot org 2006-03-13 16:17 --- it looks to me that this commit exposed/introduced the ICE: r111300 | dberlin | 2006-02-20 14:38:01 +0100 (Mon, 20 Feb 2006) | 22 lines Changed paths: M /trunk/gcc/ChangeLog M /trunk/gcc/passes.c M /trunk/gcc/tree-flow.h M /trunk/gcc/tree-pass.h M /trunk/gcc/tree-sra.c M /trunk/gcc/tree-ssa-alias.c M /trunk/gcc/tree-ssa-forwprop.c M /trunk/gcc/tree-ssa-operands.c M /trunk/gcc/tree.h 2006-02-20 Daniel Berlin [EMAIL PROTECTED] * tree.h (struct tree_memory_tag): Add is_used_alone member. (TMT_USED_ALONE): New macro. * tree-pass.h (PROP_tmt_usage): New property. (TODO_update_tmt_usage): New todo. * tree-ssa-alias.c (updating_used_alone): New variable. (recalculate_used_alone): New function. (compute_may_aliases): Set updating_used_alone, call recalculate_used_alone. * tree-sra.c (pass_sra): Note that this pass destroys PROP_tmt_usage, and add TODO_update_tmt_usage. * tree-ssa-forwprop.c (pass_forwprop): Ditto. * tree-flow.h (updating_used_alone): Prototype. (recalculate_used_alone): Ditto. * passes.c (execute_todo): Add code to set updating_used_alone, and call recalculate. * tree-ssa-operands.c (add_virtual_operand): Only append bare def for clobber if used alone, and add assert to verify used_alone status. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #11 from dberlin at gcc dot gnu dot org 2006-03-13 16:52 --- Subject: Re: [4.2 Regression] ICE in in add_virtual_operand On Mon, 2006-03-13 at 16:17 +, mueller at gcc dot gnu dot org wrote: --- Comment #10 from mueller at gcc dot gnu dot org 2006-03-13 16:17 --- it looks to me that this commit exposed/introduced the ICE: Yes, we already know that :) Thanks though. This is just another case of us catching more illegal code with this ICE (as we used to with the NMT ice). The only solution in these cases it to remove the assert and let it generate bad code, but I want to fix other issues first before removing the assert. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #12 from mueller at gcc dot gnu dot org 2006-03-13 16:56 --- ah, I see. I'm fine with working around the ICE locally and let you guys figure out how to fix the actual cause :) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #7 from rguenth at gcc dot gnu dot org 2006-03-10 10:40 --- The testcase is also full of problems itself... - changing rv to a type with the size of U, we no longer ICE. Also -fno-strict-aliasing fixes the ICE. I'm curious on how the original code looks like before reduction... -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #8 from mueller at gcc dot gnu dot org 2006-03-10 10:51 --- shorter testcase: === Cut === typedef union { int d; int L; } U; void breakme() { int rv; ovfl: ((U*)rv)-d = 42; if (((U*)rv)-L) goto ovfl; } === Cut === -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #9 from rguenth at gcc dot gnu dot org 2006-03-10 11:10 --- L2:; pretmp.23_2 = (union U *) rv; # NMT.6_4 = PHI NMT.6_5(2), NMT.6_6(5); ovfl:; rv.0_1 = pretmp.23_2; # NMT.6_6 = V_MAY_DEF NMT.6_4; rv.0_1-d = 42; # VUSE NMT.6_6; D.1529_3 = rv.0_1-L; if (D.1529_3 != 0) goto L5; else goto L1; L5:; goto bb 3 (ovfl); we prop pretmp.23_2 to rv.0_1 in rv.0_1-d = 42 -- but we don't have the NMT associated with pretmp.23_2: $5 = {pt_anything = 0, value_escapes_p = 0, is_dereferenced = 0, pt_global_mem = 0, pt_null = 0, pt_vars = 0xb7dec890, name_mem_tag = 0x0, escape_mask = 0} As we have in alias after PRE: Pointed-to sets for pointers in breakme pretmp.23_2, points-to vars: { rv } rv.0_1, name memory tag: NMT.6, is dereferenced, points-to vars: { rv } which looks inconsistent. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-03-09 22:52 --- Removing throw () will also cause the code to be ICE'd and also with the C front-end now too. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added CC||pinskia at gcc dot gnu dot ||org Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords||ice-on-valid-code Last reconfirmed|-00-00 00:00:00 |2006-03-09 22:52:29 date|| Summary|ICE in in |[4.2 Regression] ICE in in |add_virtual_operand |add_virtual_operand Target Milestone|--- |4.2.0 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-03-09 22:54 --- The difference between copyprop and before is the following. Before: rv.0_3 = rv.0_2; # VUSE NMT.7_13; D.1900_4 = rv.0_3-d; After: rv.0_3 = rv.0_2; # VUSE SMT.6; D.1900_4 = rv.0_2-d; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
Re: [Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
On Thu, 2006-03-09 at 22:54 +, pinskia at gcc dot gnu dot org wrote: --- Comment #3 from pinskia at gcc dot gnu dot org 2006-03-09 22:54 --- The difference between copyprop and before is the following. Before: rv.0_3 = rv.0_2; # VUSE NMT.7_13; D.1900_4 = rv.0_3-d; After: rv.0_3 = rv.0_2; # VUSE SMT.6; D.1900_4 = rv.0_2-d; This is nonsensical, and very bad.
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #4 from dberlin at gcc dot gnu dot org 2006-03-09 23:31 --- Subject: Re: [4.2 Regression] ICE in in add_virtual_operand On Thu, 2006-03-09 at 22:54 +, pinskia at gcc dot gnu dot org wrote: --- Comment #3 from pinskia at gcc dot gnu dot org 2006-03-09 22:54 --- The difference between copyprop and before is the following. Before: rv.0_3 = rv.0_2; # VUSE NMT.7_13; D.1900_4 = rv.0_3-d; After: rv.0_3 = rv.0_2; # VUSE SMT.6; D.1900_4 = rv.0_2-d; This is nonsensical, and very bad. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #5 from pinskia at gcc dot gnu dot org 2006-03-09 23:58 --- Forgot to say we also get the following NOTEs in the copyprop dump: NOTE: no flow-sensitive alias info for rv.0_2 in # VUSE NMT.8_14; D.2364_4 = rv.0_2-d; NOTE: no flow-sensitive alias info for rv.0_2 in # VUSE NMT.8_14; D.2364_4 = rv.0_2-d; NOTE: no flow-sensitive alias info for rv.0_2 in # NMT.8_17 = V_MAY_DEF NMT.8_14; rv.0_2-d = D.2365_5; -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626
[Bug tree-optimization/26626] [4.2 Regression] ICE in in add_virtual_operand
--- Comment #6 from dberlin at gcc dot gnu dot org 2006-03-10 00:39 --- Subject: Re: [4.2 Regression] ICE in in add_virtual_operand On Thu, 2006-03-09 at 23:58 +, pinskia at gcc dot gnu dot org wrote: --- Comment #5 from pinskia at gcc dot gnu dot org 2006-03-09 23:58 --- Forgot to say we also get the following NOTEs in the copyprop dump: NOTE: no flow-sensitive alias info for rv.0_2 in # VUSE NMT.8_14; D.2364_4 = rv.0_2-d; NOTE: no flow-sensitive alias info for rv.0_2 in # VUSE NMT.8_14; D.2364_4 = rv.0_2-d; NOTE: no flow-sensitive alias info for rv.0_2 in # NMT.8_17 = V_MAY_DEF NMT.8_14; rv.0_2-d = D.2365_5; This bare NMT usage is wrong, and indicative of a problem elsewhere. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26626