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

            Bug ID: 97593
           Summary: [11 Regression] ICE in gt_pch_nx, at
                    symbol-summary.h:290 since r11-4329-g67f3791f7d133214
           Product: gcc
           Version: 11.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: ---

The following fails since r11-4329-g67f3791f7d133214:

$ cat prusa.ii
class ConfigBase {
  virtual int *def() const;
};
class DynamicConfig : virtual ConfigBase {
  int *def() const { return 0; }
};

$ g++ -x c++-header prusa.ii -o x.pch
prusa.ii:6:2: internal compiler error: in gt_pch_nx, at symbol-summary.h:329
    6 | };
      |  ^
0x758fea void gt_pch_nx<thunk_info>(function_summary<thunk_info*>* const&)
        /home/marxin/Programming/gcc/gcc/symbol-summary.h:329
0x758fea gt_pch_nx_function_summary_thunk_info__(void*)
        /dev/shm/objdir/gcc/gtype-desc.c:6428
0x758fea gt_pch_nx_symbol_table(void*)
        /dev/shm/objdir/gcc/gtype-desc.c:6451
0x758fea gt_pch_nx_symbol_table(void*)
        /dev/shm/objdir/gcc/gtype-desc.c:6440
0xd4c785 gt_pch_save(_IO_FILE*)
        /home/marxin/Programming/gcc/gcc/ggc-common.c:430
0xb3c5a5 c_common_write_pch()
        /home/marxin/Programming/gcc/gcc/c-family/c-pch.c:177
0x97bd8c c_parse_final_cleanups()
        /home/marxin/Programming/gcc/gcc/cp/decl2.c:4866
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.

It's because I added the assert to summaries as we didn't expect PCH being
called for it.

Reply via email to