public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/97159] New: segfault in modref_may_conflict
@ 2020-09-22  9:34 vries at gcc dot gnu.org
  2020-09-22  9:38 ` [Bug tree-optimization/97159] " vries at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2020-09-22  9:34 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97159

            Bug ID: 97159
           Summary: segfault in modref_may_conflict
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org
  Target Milestone: ---

With a build of commit 48b0c1250a5c7d72be6b3fbbb1117d1cce43daee (Date: Mon Sep
21 12:46:00 2020 +0200) for x86_64-linux with nvptx accelerator, we run into:
...
FAIL: libgomp.fortran/examples-4/declare_target-1.f90   -O1  (internal compiler
error)
...

In more detail:
...
during GIMPLE pass: dse^M
/home/vries/oacc/trunk/source-gcc/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90:
In function 'fib':^M
/home/vries/oacc/trunk/source-gcc/libgomp/testsuite/libgomp.fortran/examples-4/declare_target-1.f90:6:
internal compiler error: Segmentation fault^M
0x1133447 crash_signal^M
        /home/vries/oacc/trunk/source-gcc/gcc/toplev.c:327^M
0x12b1a69 modref_may_conflict^M
        /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-alias.c:2433^M
0x12b1da0 ref_maybe_used_by_call_p_1^M
        /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-alias.c:2513^M
0x12b2af9 ref_maybe_used_by_call_p^M
        /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-alias.c:2832^M
0x12b2c2f ref_maybe_used_by_stmt_p(gimple*, ao_ref*, bool)^M
        /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-alias.c:2864^M
0x12e8b6f dse_classify_store(ao_ref*, gimple*, bool, simple_bitmap_def*, bool*,
tree_node*)^M
        /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-dse.c:831^M
0x12e9817 dse_dom_walker::dse_optimize_stmt(gimple_stmt_iterator*)^M
        /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-dse.c:1151^M
0x12e9947 dse_dom_walker::before_dom_children(basic_block_def*)^M
        /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-dse.c:1183^M
0x1bef976 dom_walker::walk(basic_block_def*)^M
        /home/vries/oacc/trunk/source-gcc/gcc/domwalk.c:309^M
0x12e9ac0 execute^M
        /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-dse.c:1237^M
...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/97159] segfault in modref_may_conflict
  2020-09-22  9:34 [Bug tree-optimization/97159] New: segfault in modref_may_conflict vries at gcc dot gnu.org
@ 2020-09-22  9:38 ` vries at gcc dot gnu.org
  2020-09-22  9:47 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2020-09-22  9:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97159

--- Comment #1 from Tom de Vries <vries at gcc dot gnu.org> ---
Segfaults because tt is NULL:
...
Program received signal SIGSEGV, Segmentation fault.
0x00000000012b1a69 in modref_may_conflict (tt=0x0, ref=0x7fffffffd8d0,
tbaa_p=true)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-alias.c:2433
2433      if (tt->every_base)
(gdb)
...

tt comes from summary->loads:
...
(gdb) up
#1  0x00000000012b1da1 in ref_maybe_used_by_call_p_1 (call=0x7ffff7ff43f0, 
    ref=0x7fffffffd8d0, tbaa_p=true)
    at /home/vries/oacc/trunk/source-gcc/gcc/tree-ssa-alias.c:2513
2513                  if (!modref_may_conflict (summary->loads, ref, tbaa_p))
...

and summary looks like:
...
(gdb) p *summary
$2 = {loads = 0x0, stores = 0x0, loads_lto = 0x0, stores_lto = 0x0, finished =
true}
...

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/97159] segfault in modref_may_conflict
  2020-09-22  9:34 [Bug tree-optimization/97159] New: segfault in modref_may_conflict vries at gcc dot gnu.org
  2020-09-22  9:38 ` [Bug tree-optimization/97159] " vries at gcc dot gnu.org
@ 2020-09-22  9:47 ` vries at gcc dot gnu.org
  2020-09-22 10:51 ` [Bug tree-optimization/97159] [11 Regression] " rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2020-09-22  9:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97159

--- Comment #2 from Tom de Vries <vries at gcc dot gnu.org> ---
Fib is a recursive function, and the problem occurs while handling a recursion
call.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/97159] [11 Regression] segfault in modref_may_conflict
  2020-09-22  9:34 [Bug tree-optimization/97159] New: segfault in modref_may_conflict vries at gcc dot gnu.org
  2020-09-22  9:38 ` [Bug tree-optimization/97159] " vries at gcc dot gnu.org
  2020-09-22  9:47 ` vries at gcc dot gnu.org
@ 2020-09-22 10:51 ` rguenth at gcc dot gnu.org
  2020-09-22 19:57   ` Jan Hubicka
  2020-09-22 19:57 ` hubicka at ucw dot cz
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-09-22 10:51 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97159

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |11.0
           Priority|P3                          |P1
           Keywords|                            |ice-on-valid-code
            Summary|segfault in                 |[11 Regression] segfault in
                   |modref_may_conflict         |modref_may_conflict

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Bug tree-optimization/97159] [11 Regression] segfault in modref_may_conflict
  2020-09-22 10:51 ` [Bug tree-optimization/97159] [11 Regression] " rguenth at gcc dot gnu.org
@ 2020-09-22 19:57   ` Jan Hubicka
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Hubicka @ 2020-09-22 19:57 UTC (permalink / raw)
  To: rguenth at gcc dot gnu.org; +Cc: gcc-bugs

Recursion is handled in normal compilation (we analyze the function and
while hitting the recursive call we skip the summary). I suppose here
the problem is missing LTO and offloading. 

With LTO lto summaries (that include types) are streamed out while they
are turned into non-lto summaries at ltrans time.  We need to do similar
thing with offload.

Honza


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/97159] [11 Regression] segfault in modref_may_conflict
  2020-09-22  9:34 [Bug tree-optimization/97159] New: segfault in modref_may_conflict vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-09-22 10:51 ` [Bug tree-optimization/97159] [11 Regression] " rguenth at gcc dot gnu.org
@ 2020-09-22 19:57 ` hubicka at ucw dot cz
  2020-10-05  7:17 ` vries at gcc dot gnu.org
  2020-10-06  8:18 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 8+ messages in thread
From: hubicka at ucw dot cz @ 2020-09-22 19:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97159

--- Comment #3 from Jan Hubicka <hubicka at ucw dot cz> ---
Recursion is handled in normal compilation (we analyze the function and
while hitting the recursive call we skip the summary). I suppose here
the problem is missing LTO and offloading. 

With LTO lto summaries (that include types) are streamed out while they
are turned into non-lto summaries at ltrans time.  We need to do similar
thing with offload.

Honza

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/97159] [11 Regression] segfault in modref_may_conflict
  2020-09-22  9:34 [Bug tree-optimization/97159] New: segfault in modref_may_conflict vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-09-22 19:57 ` hubicka at ucw dot cz
@ 2020-10-05  7:17 ` vries at gcc dot gnu.org
  2020-10-06  8:18 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2020-10-05  7:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97159

--- Comment #4 from Tom de Vries <vries at gcc dot gnu.org> ---
I'm currently not running into this ICE anymore, so presumably it was fixed.

I'm not sure by which commit though.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/97159] [11 Regression] segfault in modref_may_conflict
  2020-09-22  9:34 [Bug tree-optimization/97159] New: segfault in modref_may_conflict vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2020-10-05  7:17 ` vries at gcc dot gnu.org
@ 2020-10-06  8:18 ` vries at gcc dot gnu.org
  5 siblings, 0 replies; 8+ messages in thread
From: vries at gcc dot gnu.org @ 2020-10-06  8:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97159

Tom de Vries <vries at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #5 from Tom de Vries <vries at gcc dot gnu.org> ---
Marking resolved-fixed.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-10-06  8:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22  9:34 [Bug tree-optimization/97159] New: segfault in modref_may_conflict vries at gcc dot gnu.org
2020-09-22  9:38 ` [Bug tree-optimization/97159] " vries at gcc dot gnu.org
2020-09-22  9:47 ` vries at gcc dot gnu.org
2020-09-22 10:51 ` [Bug tree-optimization/97159] [11 Regression] " rguenth at gcc dot gnu.org
2020-09-22 19:57   ` Jan Hubicka
2020-09-22 19:57 ` hubicka at ucw dot cz
2020-10-05  7:17 ` vries at gcc dot gnu.org
2020-10-06  8:18 ` vries at gcc dot gnu.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).