[Bug c++/88256] [7/8/9 Regression] ICE: Segmentation fault (in make_ssa_name_fn), C++ FE missing DECL_EXPRs

2019-04-22 Thread jason at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88256

--- Comment #8 from Jason Merrill  ---
*** Bug 89910 has been marked as a duplicate of this bug. ***

[Bug c++/88256] [7/8/9 Regression] ICE: Segmentation fault (in make_ssa_name_fn), C++ FE missing DECL_EXPRs

2019-02-25 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88256

Jakub Jelinek  changed:

   What|Removed |Added

 CC||gs...@t-online.de

--- Comment #7 from Jakub Jelinek  ---
*** Bug 89439 has been marked as a duplicate of this bug. ***

[Bug c++/88256] [7/8/9 Regression] ICE: Segmentation fault (in make_ssa_name_fn), C++ FE missing DECL_EXPRs

2018-12-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88256

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

[Bug c++/88256] [7/8/9 Regression] ICE: Segmentation fault (in make_ssa_name_fn), C++ FE missing DECL_EXPRs

2018-12-06 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88256

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|7.4 |7.5

[Bug c++/88256] [7/8/9 Regression] ICE: Segmentation fault (in make_ssa_name_fn), C++ FE missing DECL_EXPRs

2018-11-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88256

--- Comment #6 from Richard Biener  ---
(In reply to Arseny Solokha from comment #4)
> But the fix seems to be specific to C front-end and does not cover C++?

Yeah, I can reproduce with the C++ FE which probably needs a similar fix.

[Bug c++/88256] [7/8/9 Regression] ICE: Segmentation fault (in make_ssa_name_fn), C++ FE missing DECL_EXPRs

2018-11-29 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88256

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
  Component|ipa |c++
   Assignee|rguenth at gcc dot gnu.org |unassigned at gcc dot 
gnu.org
Summary|[7/8/9 Regression] ICE: |[7/8/9 Regression] ICE:
   |Segmentation fault (in  |Segmentation fault (in
   |make_ssa_name_fn)   |make_ssa_name_fn), C++ FE
   ||missing DECL_EXPRs

--- Comment #5 from Richard Biener  ---
Program received signal SIGSEGV, Segmentation fault.
0x0174d104 in make_ssa_name_fn (fn=0x769e6160, var=, 
stmt=, version=0)
at /space/rguenther/src/gcc-sccvn/gcc/tree-ssanames.c:268
268   gcc_assert (VAR_P (var)

we are remapping a released SSA name referenced from TYPE_SIZE of
int[0:(sizetype) D.2308][0:(sizetype) D.2307]

Thus this is a FE issue where we lack a DECL_EXPR for the type used in
some memory reference:

(gdb) p debug_gimple_stmt (stmt)
# VUSE <.MEM_6(D)>
_5 = MEM[(int[0:(sizetype) D.2308][0:(sizetype) D.2307] *)foo.2_4][0]{lb: 0 sz:
_3 * 4}[0];

static void f2 (int arg) { res = ((int (*)[arg][b]) foo)[0][0][0]; }

is in .original

;; Function void f2(int) (null)
;; enabled by -tree-original


<) + 1) *
((sizetype) (SAVE_EXPR <(ssizetype) arg + -1>) + 1);, (int[0:(sizetype)
(SAVE_EXPR <(ssizetype) arg + -1>)][0:(sizetype) (SAVE_EXPR <(ssizetype) b +
-1>)] *) foo;))[0][0]) >;


there's no DECL_EXPR so size expressions are not properly unshared.  IIRC
there's a duplicate PR where I ran into a similar issue.  I'm probably
thinking of PR86216 which sadly also has no attention from FE maintainers.

Anyway, C++ FE bug.