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

            Bug ID: 104333
           Summary: [11/12 Regression] ICE with -flto
                    -Wl,-plugin-opt=debug
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: marxin at gcc dot gnu.org
  Target Milestone: ---

extern int printf (const char *, ...);
int foo (int arg) { return printf ("hello %d\n", arg); }
int main (int argc) { return foo (argc); }

./xgcc -B ./ -flto -Wl,-plugin-opt=debug rh2048551.c
ICEs
lto1: internal compiler error: in read_cgraph_and_symbols, at
lto/lto-common.cc:2740
0xab4035 read_cgraph_and_symbols(unsigned int, char const**)
        ../../gcc/lto/lto-common.cc:2740
0xa88d99 lto_main()
        ../../gcc/lto/lto.cc:625
in GCC 11 and 12, while it correctly complains:
xgcc: error: debug: No such file or directory
in GCC 10.
The reporter meant -Wl,-plugin-opt=-debug which works in all cases, but we
shouldn't ICE even on bad arguments.

Reply via email to