public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
@ 2021-11-03 13:46 marxin at gcc dot gnu.org
  2021-11-03 13:46 ` [Bug ipa/103058] " marxin at gcc dot gnu.org
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-03 13:46 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103058
           Summary: ICE in gimple_call_static_chain_flags, at
                    gimple.c:1669 when building 527.cam4_r
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: hubicka at gcc dot gnu.org, marxin at gcc dot gnu.org
  Target Milestone: ---

One can see it with -O2 -flto=auto -march=znver2:

radsw.fppized.f90:39:19: internal compiler error: in
gimple_call_static_chain_flags, at gimple.c:1669
   39 | subroutine radcswmx(lchnk   ,ncol    ,                         &
      |                   ^
0x6a0183 gimple_call_static_chain_flags(gcall const*)
        /home/marxin/Programming/gcc/gcc/gimple.c:1669
0xfe7959 handle_rhs_call
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:4258
0xfeaaa2 find_func_aliases_for_call
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:4921
0xfeaaa2 find_func_aliases
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:5024
0xfec63a compute_points_to_sets
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:7440
0xfec63a compute_may_aliases()
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:7948
0xce40cc execute_function_todo
        /home/marxin/Programming/gcc/gcc/passes.c:2014
0xce461b execute_todo
        /home/marxin/Programming/gcc/gcc/passes.c:2096

Started with g:a70c05120ae6 where the assert was introduced.

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

* [Bug ipa/103058] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
@ 2021-11-03 13:46 ` marxin at gcc dot gnu.org
  2021-11-03 14:49 ` [Bug ipa/103058] [12 Regression] " hubicka at kam dot mff.cuni.cz
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-03 13:46 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Target Milestone|---                         |12.0
     Ever confirmed|0                           |1
             Blocks|                            |26163
   Last reconfirmed|                            |2021-11-03
           Priority|P3                          |P1


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=26163
[Bug 26163] [meta-bug] missed optimization in SPEC (2k17, 2k and 2k6 and 95)

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

* [Bug ipa/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
  2021-11-03 13:46 ` [Bug ipa/103058] " marxin at gcc dot gnu.org
@ 2021-11-03 14:49 ` hubicka at kam dot mff.cuni.cz
  2021-11-03 17:17 ` marxin at gcc dot gnu.org
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hubicka at kam dot mff.cuni.cz @ 2021-11-03 14:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from hubicka at kam dot mff.cuni.cz ---
> One can see it with -O2 -flto=auto -march=znver2:
> 
> radsw.fppized.f90:39:19: internal compiler error: in
> gimple_call_static_chain_flags, at gimple.c:1669
>    39 | subroutine radcswmx(lchnk   ,ncol    ,                         &
>       |                   ^
> 0x6a0183 gimple_call_static_chain_flags(gcall const*)
>         /home/marxin/Programming/gcc/gcc/gimple.c:1669

Interesting, I added the check to verify that we do not produce
interposable calls to nested functions.  Doing so does not make very
good sense since they do not have stable API, so they can not really be
called cross-module.

What is a motivation to produce them at first place?
Honza

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

* [Bug ipa/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
  2021-11-03 13:46 ` [Bug ipa/103058] " marxin at gcc dot gnu.org
  2021-11-03 14:49 ` [Bug ipa/103058] [12 Regression] " hubicka at kam dot mff.cuni.cz
@ 2021-11-03 17:17 ` marxin at gcc dot gnu.org
  2021-11-03 17:28 ` pinskia at gcc dot gnu.org
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-03 17:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
It's a fortran benchmark where I was able to reduce it to 4 object files:
radae.fppized.o quicksort.fppized.o radlw.fppized.o radsw.fppized.o

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

* [Bug ipa/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-11-03 17:17 ` marxin at gcc dot gnu.org
@ 2021-11-03 17:28 ` pinskia at gcc dot gnu.org
  2021-11-04 15:34 ` hubicka at kam dot mff.cuni.cz
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-03 17:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #2)
> It's a fortran benchmark where I was able to reduce it to 4 object files:
> radae.fppized.o quicksort.fppized.o radlw.fppized.o radsw.fppized.o

Hmm, this would mean the nested function might be split into a different object
file.

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

* [Bug ipa/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-11-03 17:28 ` pinskia at gcc dot gnu.org
@ 2021-11-04 15:34 ` hubicka at kam dot mff.cuni.cz
  2021-11-04 16:11 ` cvs-commit at gcc dot gnu.org
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hubicka at kam dot mff.cuni.cz @ 2021-11-04 15:34 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from hubicka at kam dot mff.cuni.cz ---
Hi,
I am testing the following to unbreak fortran.
However the real bug is that binds_to_current_def should work on whole
WPA and be independent of partitioning.  I remember I had patch fixing
that. Will look it up.

Honza

diff --git a/gcc/gimple.c b/gcc/gimple.c
index 76768c19c8e..7a578f5113e 100644
--- a/gcc/gimple.c
+++ b/gcc/gimple.c
@@ -1666,7 +1666,18 @@ gimple_call_static_chain_flags (const gcall *stmt)
          int modref_flags = summary->static_chain_flags;

          /* We have possibly optimized out load.  Be conservative here.  */
-         gcc_checking_assert (node->binds_to_current_def_p ());
+         if (!node->binds_to_current_def_p ())
+           {
+             if ((modref_flags & EAF_UNUSED) && !(flags & EAF_UNUSED))
+               {
+                 modref_flags &= ~EAF_UNUSED;
+                 modref_flags |= EAF_NOESCAPE;
+               }
+             if ((modref_flags & EAF_NOREAD) && !(flags & EAF_NOREAD))
+               modref_flags &= ~EAF_NOREAD;
+             if ((modref_flags & EAF_DIRECT) && !(flags & EAF_DIRECT))
+               modref_flags &= ~EAF_DIRECT;
+           }
          if (dbg_cnt (ipa_mod_ref_pta))
            flags |= modref_flags;
        }

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

* [Bug ipa/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-11-04 15:34 ` hubicka at kam dot mff.cuni.cz
@ 2021-11-04 16:11 ` cvs-commit at gcc dot gnu.org
  2021-11-04 17:03 ` [Bug fortran/103058] " hubicka at gcc dot gnu.org
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-04 16:11 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:

https://gcc.gnu.org/g:d3f7a2fa64f8777cb7eae1b99ff80fbe717095ac

commit r12-4914-gd3f7a2fa64f8777cb7eae1b99ff80fbe717095ac
Author: Jan Hubicka <jh@suse.cz>
Date:   Thu Nov 4 17:07:44 2021 +0100

    Workaround ICE in gimple_call_static_chain_flags

    gcc/ChangeLog:

    2021-11-04  Jan Hubicka  <hubicka@ucw.cz>

            PR ipa/103058
            * gimple.c (gimple_call_static_chain_flags): Handle case when
            nested function does not bind locally.

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

* [Bug fortran/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-11-04 16:11 ` cvs-commit at gcc dot gnu.org
@ 2021-11-04 17:03 ` hubicka at gcc dot gnu.org
  2021-11-04 19:08 ` anlauf at gcc dot gnu.org
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-11-04 17:03 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|ipa                         |fortran

--- Comment #6 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Looking at the particular ICE, this looks like a fortran frond-end issue - this
is during compilation and not during link and I do not see why Fortran should
produce nested function with external linkage.
I comitted a patch that silences the ICE, but it would be nice to make the
function static for Fortran.

Changing component to fortran.

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

* [Bug fortran/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-11-04 17:03 ` [Bug fortran/103058] " hubicka at gcc dot gnu.org
@ 2021-11-04 19:08 ` anlauf at gcc dot gnu.org
  2021-11-05 13:18 ` marxin at gcc dot gnu.org
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: anlauf at gcc dot gnu.org @ 2021-11-04 19:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from anlauf at gcc dot gnu.org ---
(In reply to Jan Hubicka from comment #6)
> Looking at the particular ICE, this looks like a fortran frond-end issue -
> this is during compilation and not during link and I do not see why Fortran
> should produce nested function with external linkage.
> I comitted a patch that silences the ICE, but it would be nice to make the
> function static for Fortran.
> 
> Changing component to fortran.

Can you attach a reproducer?

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

* [Bug fortran/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-11-04 19:08 ` anlauf at gcc dot gnu.org
@ 2021-11-05 13:18 ` marxin at gcc dot gnu.org
  2021-11-05 13:25 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-05 13:18 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Jan Hubicka from comment #6)
> Looking at the particular ICE, this looks like a fortran frond-end issue -
> this is during compilation and not during link and I do not see why Fortran
> should produce nested function with external linkage.
> I comitted a patch that silences the ICE, but it would be nice to make the
> function static for Fortran.
> 
> Changing component to fortran.

Looking at the symbol with the following patch:

diff --git a/gcc/cgraph.c b/gcc/cgraph.c
index de078653781..58112901bfe 100644
--- a/gcc/cgraph.c
+++ b/gcc/cgraph.c
@@ -2203,6 +2203,10 @@ cgraph_node::dump (FILE *f)
     fprintf (f, " %soperator_delete",
             DECL_IS_REPLACEABLE_OPERATOR (decl) ? "replaceable_" : "");

+  function *fn = DECL_STRUCT_FUNCTION (decl);
+  if (fn != NULL && fn->static_chain_decl)
+    fprintf (f, " has_static_chain_decl");
+
   fprintf (f, "\n");

   if (thunk)

Compiled in quicksort.fppized.f90.000i.cgraph:

quick_sort_1.1/2 (quick_sort_1) @0x7ffff7669550
  Type: function definition analyzed
  Visibility:
  Aux: @0x28f9d40
  References: 
  Referring: 
  Function flags: body has_static_chain_decl
  Called by: quick_sort_1.1/2 quick_sort_1.1/2 __quicksort_MOD_quick_sort/1 
  Calls: quick_sort_1.1/2 quick_sort_1.1/2 interchange_sort.0/0 

Then when the LTRANS ICE happens, I see:

(gdb) p node->debug()
quick_sort_1.1.lto_priv.0/213 (quick_sort_1) @0x7ffff7499cc0
  Type: function
  Body removed by symtab_remove_unreachable_nodes
  Visibility: in_other_partition prevailing_def_ironly external public
visibility_specified visibility:hidden
  References: 
  Referring: 
  Availability: local
  Unit id: 3
  Function flags: count:19391457 (estimated locally) local nonfreeing_fn
  Called by: 
  Calls: 

Does it really have the external linkage?

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

* [Bug fortran/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2021-11-05 13:18 ` marxin at gcc dot gnu.org
@ 2021-11-05 13:25 ` marxin at gcc dot gnu.org
  2021-11-05 17:14 ` hubicka at kam dot mff.cuni.cz
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-05 13:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
And WPA cgraph dump tells:

quick_sort_1.1/213 (quick_sort_1) @0x7ffff74c2550
  Type: function definition analyzed
  Visibility: prevailing_def_ironly
  References: 
  Referring: 
  Read from file: quicksort.fppized.o
  Availability: local
  Unit id: 2
  Function flags: count:19391457 (estimated locally) local
  Called by: __quicksort_MOD_quick_sort/212 (1073741824 (estimated
locally),1.00 per call) quick_sort_1.1/213 (4287451 (estimated locally),0.22
per call) quick_sort_1.1/213 (4287451 (estimated locally),0.22 per call) 
  Calls: quick_sort_1.1/213 (4287451 (estimated locally),0.22 per call)
quick_sort_1.1/213 (4287451 (estimated locally),0.22 per call)
interchange_sort.0/211 (6399181 (estimated locally),0.33 per call) 

So the DECL_EXTERNAL should be false, right?

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

* [Bug fortran/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (9 preceding siblings ...)
  2021-11-05 13:25 ` marxin at gcc dot gnu.org
@ 2021-11-05 17:14 ` hubicka at kam dot mff.cuni.cz
  2021-11-05 17:49 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: hubicka at kam dot mff.cuni.cz @ 2021-11-05 17:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from hubicka at kam dot mff.cuni.cz ---
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103058
> 
> --- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
> And WPA cgraph dump tells:
> 
> quick_sort_1.1/213 (quick_sort_1) @0x7ffff74c2550
>   Type: function definition analyzed
>   Visibility: prevailing_def_ironly
>   References: 
>   Referring: 
>   Read from file: quicksort.fppized.o
>   Availability: local
>   Unit id: 2
>   Function flags: count:19391457 (estimated locally) local
>   Called by: __quicksort_MOD_quick_sort/212 (1073741824 (estimated
> locally),1.00 per call) quick_sort_1.1/213 (4287451 (estimated locally),0.22
> per call) quick_sort_1.1/213 (4287451 (estimated locally),0.22 per call) 
>   Calls: quick_sort_1.1/213 (4287451 (estimated locally),0.22 per call)
> quick_sort_1.1/213 (4287451 (estimated locally),0.22 per call)
> interchange_sort.0/211 (6399181 (estimated locally),0.33 per call) 
> 
> So the DECL_EXTERNAL should be false, right?
This is due to partitining which exports the symbol between WPA and
ltrans. Still at ltrans time binds_to_currrent_def should
return true because we have prevailing_def_ironly resolution info.

I will write some verifier on this.
Honza

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

* [Bug fortran/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (10 preceding siblings ...)
  2021-11-05 17:14 ` hubicka at kam dot mff.cuni.cz
@ 2021-11-05 17:49 ` marxin at gcc dot gnu.org
  2021-11-05 17:57 ` hubicka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-05 17:49 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Martin Liška <marxin at gcc dot gnu.org> ---
Minimal reproducer:

$ cat x.f90
SUBROUTINE quick_sort(list)
REAL, DIMENSION (INOUT)  :: list
CALL quick_sort_1(1, SIZE(list))
CONTAINS
RECURSIVE SUBROUTINE quick_sort_1(left_end, right_end)
INTEGER right_end
IF (right_end < max_simple_sort_size) THEN
  DO
    DO
      IF (list(j) <= reference) EXIT
    END DO
    IF (i < j) THEN
      EXIT
    END IF
  END DO
  CALL quick_sort_1(i, right_end)
END IF
END  
end 

$ gcc -O2 -flto -g x.f90 -c -march=znver1 && gcc -flto-partition=max x.o
-shared
lto-wrapper: warning: using serial compilation of 2 LTRANS jobs
lto-wrapper: note: see the ‘-flto’ option documentation for more information
during GIMPLE pass: alias
x.f90: In function ‘quick_sort’:
x.f90:1:21: internal compiler error: in gimple_call_static_chain_flags, at
gimple.c:1667
    1 | SUBROUTINE quick_sort(list)
      |                     ^
0xcf2c45 gimple_call_static_chain_flags(gcall const*)
        /home/marxin/Programming/gcc/gcc/gimple.c:1667
0x13b40a5 handle_rhs_call
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:4258
0x13b5da0 find_func_aliases_for_call
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:4911
0x13b632b find_func_aliases
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:5024
0x13bd743 compute_points_to_sets
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:7440
0x13bf32c compute_may_aliases()
        /home/marxin/Programming/gcc/gcc/tree-ssa-structalias.c:7948
0x101203a execute_function_todo
        /home/marxin/Programming/gcc/gcc/passes.c:2014
0x1010f7f do_per_function
        /home/marxin/Programming/gcc/gcc/passes.c:1687
0x10123aa execute_todo
        /home/marxin/Programming/gcc/gcc/passes.c:2096
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
lto-wrapper: fatal error: gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: fatal error: lto-wrapper failed
collect2: error: ld returned 1 exit status

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

* [Bug fortran/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (11 preceding siblings ...)
  2021-11-05 17:49 ` marxin at gcc dot gnu.org
@ 2021-11-05 17:57 ` hubicka at gcc dot gnu.org
  2021-11-06 22:36 ` cvs-commit at gcc dot gnu.org
  2021-11-12 22:14 ` hubicka at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-11-05 17:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
So the problem in this case really isn't fortran bug, but somewhat weird
iteraction between visibility predicates.  In particular we make
binds_to_current_def to return false if symbol can be discarded and
can_be_discarded is wrong by ignoring resolution info in the case of
DECL_EXTERNAL.

I am not sure why we check can_be_discarded in binds_to_current_def at first
place.  I am looking into that.

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

* [Bug fortran/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (12 preceding siblings ...)
  2021-11-05 17:57 ` hubicka at gcc dot gnu.org
@ 2021-11-06 22:36 ` cvs-commit at gcc dot gnu.org
  2021-11-12 22:14 ` hubicka at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-11-06 22:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jan Hubicka <hubicka@gcc.gnu.org>:

https://gcc.gnu.org/g:6078eb7452aa89cb9aeecac30932b58967389459

commit r12-4974-g6078eb7452aa89cb9aeecac30932b58967389459
Author: Jan Hubicka <hubicka@ucw.cz>
Date:   Sat Nov 6 23:36:08 2021 +0100

    Fix can_be_discarded_p wrt partitioned functions.

    gcc/ChangeLog:

            * cgraph.h (cgraph_node::can_be_discarded_p): Do not
            return true on functions from other partition.

    gcc/lto/ChangeLog:

            PR ipa/103070
            PR ipa/103058
            * lto-partition.c (must_not_rename): Update comment.
            (promote_symbol): Set resolution to LDPR_PREVAILING_DEF_IRONLY.

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

* [Bug fortran/103058] [12 Regression] ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r
  2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
                   ` (13 preceding siblings ...)
  2021-11-06 22:36 ` cvs-commit at gcc dot gnu.org
@ 2021-11-12 22:14 ` hubicka at gcc dot gnu.org
  14 siblings, 0 replies; 16+ messages in thread
From: hubicka at gcc dot gnu.org @ 2021-11-12 22:14 UTC (permalink / raw)
  To: gcc-bugs

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

Jan Hubicka <hubicka at gcc dot gnu.org> changed:

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

--- Comment #14 from Jan Hubicka <hubicka at gcc dot gnu.org> ---
Fixed.

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

end of thread, other threads:[~2021-11-12 22:14 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-03 13:46 [Bug ipa/103058] New: ICE in gimple_call_static_chain_flags, at gimple.c:1669 when building 527.cam4_r marxin at gcc dot gnu.org
2021-11-03 13:46 ` [Bug ipa/103058] " marxin at gcc dot gnu.org
2021-11-03 14:49 ` [Bug ipa/103058] [12 Regression] " hubicka at kam dot mff.cuni.cz
2021-11-03 17:17 ` marxin at gcc dot gnu.org
2021-11-03 17:28 ` pinskia at gcc dot gnu.org
2021-11-04 15:34 ` hubicka at kam dot mff.cuni.cz
2021-11-04 16:11 ` cvs-commit at gcc dot gnu.org
2021-11-04 17:03 ` [Bug fortran/103058] " hubicka at gcc dot gnu.org
2021-11-04 19:08 ` anlauf at gcc dot gnu.org
2021-11-05 13:18 ` marxin at gcc dot gnu.org
2021-11-05 13:25 ` marxin at gcc dot gnu.org
2021-11-05 17:14 ` hubicka at kam dot mff.cuni.cz
2021-11-05 17:49 ` marxin at gcc dot gnu.org
2021-11-05 17:57 ` hubicka at gcc dot gnu.org
2021-11-06 22:36 ` cvs-commit at gcc dot gnu.org
2021-11-12 22:14 ` hubicka 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).