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

            Bug ID: 124260
           Summary: [16 Regression] ICE during IPA pass: cp when producing
                    64b objective-c code on 32b host
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: ipa
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iains at gcc dot gnu.org
                CC: jamborm at gcc dot gnu.org
  Target Milestone: ---
            Target: i686-apple-darwin9

Created attachment 63788
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=63788&action=edit
preprocessed file

Apologies for taking some time to report this.

After r16-6150-g7b3af2bfa1dee9, many (probably most) of i686-darwin9 -m64
objective-c tests fail with a seg (this is reproducible with a cross from
x86_64-linux to i686-apple-darwin9).

gcc/cc1obj -fpreprocessed trivial.mi -fPIC -quiet -dumpbase trivial.m
-dumpbase-ext .m -m64 -mmacosx-version-min=10.5 -mtune=core2 -O2 -version -o
trivial.s

macOS :

  * frame #0: 0x0000000100001583 cc1obj`tree_check(__t=0x0000000000000000,
__f="/src-local/gcc-master-patched/gcc/tree.h", __l=6912,
__g="int_bit_position", __c=FIELD_DECL) at tree.h:4047:7
    frame #1: 0x00000001019094c2
cc1obj`int_bit_position(field=0x0000000000000000) at tree.h:6912:21
    frame #2: 0x0000000101e319bc
cc1obj`ipa_analyze_var_static_initializer(node=0x0000000106998d00) at
ipa-prop.cc:3642:51
    frame #3: 0x0000000101d67272 cc1obj`::ipcp_generate_summary() at
ipa-cp.cc:6519:40
    frame #4: 0x00000001020ff358
cc1obj`execute_ipa_summary_passes(ipa_pass=0x000060000107c460) at
passes.cc:2293:31
    frame #5: 0x0000000101832eaf cc1obj`::ipa_passes() at cgraphunit.cc:2264:2
    frame #6: 0x000000010183326c
cc1obj`symbol_table::compile(this=0x00000001065f7000) at cgraphunit.cc:2362:16
    frame #7: 0x0000000101833ac4
cc1obj`symbol_table::finalize_compilation_unit(this=0x00000001065f7000) at
cgraphunit.cc:2619:11
    frame #8: 0x000000010230297e cc1obj`::compile_file() at toplev.cc:482:41
    frame #9: 0x0000000102306873 cc1obj`::do_compile() at toplev.cc:2224:24
    frame #10: 0x0000000102306e63 cc1obj`toplev::main(this=0x000000030a628e3a,
argc=16, argv=0x000000030a6294e0) at toplev.cc:2389:18
    frame #11: 0x0000000102bdbab4 cc1obj`main(argc=16, argv=0x000000030a6294e0)
at main.cc:39:23

====
Linux (note it is a next runtime issue):

$ ./gcc/xgcc -Bgcc -fpreprocessed ../trivial.mi -fnext-runtime -S -O2 -m64
during IPA pass: cp
/src-local/gcc-master/gcc/testsuite/objc.dg/torture/trivial.m:10:1: internal
compiler error: Segmentation fault
0x277c63f internal_error(char const*, ...)
        ../../src/gcc/diagnostic-global-context.cc:787
0x128c90f crash_signal
        ../../src/gcc/toplev.cc:325
0x7fcd848e0ddf ???
        ./signal/../sysdeps/unix/sysv/linux/x86_64/sigaction.c:0
0xa9c384 tree_check(tree_node const*, char const*, int, char const*, tree_code)
        ../../src/gcc/tree.h:4047
0xa9c384 int_bit_position(tree_node const*)
        ../../src/gcc/tree.h:6912
0xfd9b75 ipa_analyze_var_static_initializer(varpool_node*)
        ../../src/gcc/ipa-prop.cc:3642
0x25b3677 ipcp_generate_summary
        ../../src/gcc/ipa-cp.cc:6519
0x114055b execute_ipa_summary_passes(ipa_opt_pass_d*)
        ../../src/gcc/passes.cc:2293
0xcc709f ipa_passes
        ../../src/gcc/cgraphunit.cc:2264
0xcc709f symbol_table::compile()
        ../../src/gcc/cgraphunit.cc:2362
0xcc9ddd symbol_table::compile()
        ../../src/gcc/cgraphunit.cc:2340
0xcc9ddd symbol_table::finalize_compilation_unit()
        ../../src/gcc/cgraphunit.cc:2619

Reply via email to