public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/101131] New: ICE with -O2: in noninterposable_alias, at symtab.c:2011
@ 2021-06-18 23:24 cnsun at uwaterloo dot ca
  2021-06-21  8:23 ` [Bug ipa/101131] " marxin at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-06-18 23:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101131
           Summary: ICE with -O2: in noninterposable_alias, at
                    symtab.c:2011
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.M5bbDhYIJL-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210618 (experimental) [master revision
:9f6824b35:688359a27d835bbdab554fdf5eb207f1bd678371] (GCC)

$ cat mutant.c
extern_declared_variable;
global_defined_function() { static_function(); }
__attribute__((ifunc("resolver"))) static_function() {
  if (extern_declared_variable)
    return global_defined_function();
}

$ gcc-trunk -O2 mutant.c
mutant.c:1:1: warning: data definition has no type or storage class
    1 | extern_declared_variable;
      | ^~~~~~~~~~~~~~~~~~~~~~~~
mutant.c:1:1: warning: type defaults to ‘int’ in declaration of
‘extern_declared_variable’ [-Wimplicit-int]
mutant.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    2 | global_defined_function() { static_function(); }
      | ^~~~~~~~~~~~~~~~~~~~~~~
mutant.c: In function ‘global_defined_function’:
mutant.c:2:29: warning: implicit declaration of function ‘static_function’
[-Wimplicit-function-declaration]
    2 | global_defined_function() { static_function(); }
      |                             ^~~~~~~~~~~~~~~
mutant.c: At top level:
mutant.c:3:36: warning: return type defaults to ‘int’ [-Wimplicit-int]
    3 | __attribute__((ifunc("resolver"))) static_function() {
      |                                    ^~~~~~~~~~~~~~~
mutant.c:3:36: warning: ‘alias’ attribute ignored because function is defined
[-Wattributes]
during IPA pass: whole-program
mutant.c:6:1: internal compiler error: in noninterposable_alias, at
symtab.c:2011
    6 | }
      | ^
0x695a35 symtab_node::noninterposable_alias()
        /tmp/tmp.M5bbDhYIJL-gcc-builder/gcc/gcc/symtab.c:2011
0x19fd08f function_and_variable_visibility
        /tmp/tmp.M5bbDhYIJL-gcc-builder/gcc/gcc/ipa-visibility.c:773
0x19fd6ca whole_program_function_and_variable_visibility
        /tmp/tmp.M5bbDhYIJL-gcc-builder/gcc/gcc/ipa-visibility.c:921
0x19fd6ca execute
        /tmp/tmp.M5bbDhYIJL-gcc-builder/gcc/gcc/ipa-visibility.c:969
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.

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

* [Bug ipa/101131] ICE with -O2: in noninterposable_alias, at symtab.c:2011
  2021-06-18 23:24 [Bug c/101131] New: ICE with -O2: in noninterposable_alias, at symtab.c:2011 cnsun at uwaterloo dot ca
@ 2021-06-21  8:23 ` marxin at gcc dot gnu.org
  2021-08-13  9:24 ` marxin at gcc dot gnu.org
  2021-08-16 11:39 ` marxin at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-06-21  8:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |marxin at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2021-06-21
     Ever confirmed|0                           |1

--- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> ---
I can take a look.

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

* [Bug ipa/101131] ICE with -O2: in noninterposable_alias, at symtab.c:2011
  2021-06-18 23:24 [Bug c/101131] New: ICE with -O2: in noninterposable_alias, at symtab.c:2011 cnsun at uwaterloo dot ca
  2021-06-21  8:23 ` [Bug ipa/101131] " marxin at gcc dot gnu.org
@ 2021-08-13  9:24 ` marxin at gcc dot gnu.org
  2021-08-16 11:39 ` marxin at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-13  9:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
Cleaned up test-case:

$ cat pr101131.c
int extern_declared_variable;
int static_function();

int global_defined_function() { static_function(); }

int
__attribute__((ifunc("resolver"))) static_function() {
  if (extern_declared_variable)
    return global_defined_function();
}

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

* [Bug ipa/101131] ICE with -O2: in noninterposable_alias, at symtab.c:2011
  2021-06-18 23:24 [Bug c/101131] New: ICE with -O2: in noninterposable_alias, at symtab.c:2011 cnsun at uwaterloo dot ca
  2021-06-21  8:23 ` [Bug ipa/101131] " marxin at gcc dot gnu.org
  2021-08-13  9:24 ` marxin at gcc dot gnu.org
@ 2021-08-16 11:39 ` marxin at gcc dot gnu.org
  2 siblings, 0 replies; 4+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-08-16 11:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|marxin at gcc dot gnu.org          |unassigned at gcc dot gnu.org
             Status|ASSIGNED                    |NEW

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

end of thread, other threads:[~2021-08-16 11:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 23:24 [Bug c/101131] New: ICE with -O2: in noninterposable_alias, at symtab.c:2011 cnsun at uwaterloo dot ca
2021-06-21  8:23 ` [Bug ipa/101131] " marxin at gcc dot gnu.org
2021-08-13  9:24 ` marxin at gcc dot gnu.org
2021-08-16 11:39 ` marxin 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).