Help on a bug showing up in a template

Gary Oblock gary@amperecomputing.com
Wed Jul 15 23:24:45 GMT 2020


I'm encountering a really painful error. The stack trace is below.

The code in hash-table.h is a template and it is really hyper-allergic
to instrumentation (a couple of fprintfs caused malloc to have an
internal error!)  Last time I checked gbd didn't exactly play nice
with templates either. Note, I tried adding --enable-checking=all to
my configure but all that did was cause a library installation failure.

If anybody has any clues about how to handle this kind of a bug or
even better yet if you have an a idea of what I did wrong then please
let me know.

Note, the particular optimization I'm working on is done at IPA time
and involve creating a bunce of gimple stmts, new types, new ssa temps
and changing the types of some existing declarations and ssa temps.

Thanks,

Gary

---------------------------------------------------------------------


during IPA pass: inline
dump file: ./exe.ltrans0.ltrans.079i.inline
main.c: In function ‘main’:
main.c:18:11: internal compiler error: Segmentation fault
   18 |   max_y = max_of_y( data, len);
      |           ^
0xcbb4af crash_signal
../../source/gcc/toplev.c:328
0xd24d66 hash_table<ssa_name_hasher, false, xcallocator>::find_with_hash(tree_node* const&, unsigned int)
../../source/gcc/hash-table.h:925
0xd21d23 ssa_default_def(function*, tree_node*)
../../source/gcc/tree-dfa.c:315
0xd56988 setup_one_parameter
../../source/gcc/tree-inline.c:3429
0xd5cb35 initialize_inlined_parameters
../../source/gcc/tree-inline.c:3585
0xd5cb35 expand_call_inline
../../source/gcc/tree-inline.c:4936
0xd5f8e9 gimple_expand_calls_inline
../../source/gcc/tree-inline.c:5266
0xd5f8e9 optimize_inline_calls(tree_node*)
../../source/gcc/tree-inline.c:5439
0xa02023 inline_transform(cgraph_node*)
../../source/gcc/ipa-inline-transform.c:736
0xb8d979 execute_one_ipa_transform_pass
../../source/gcc/passes.c:2233
0xb8d979 execute_all_ipa_transforms(bool)
../../source/gcc/passes.c:2272
0x75c15b cgraph_node::expand()
../../source/gcc/cgraphunit.c:2294
0x75d858 expand_all_functions
../../source/gcc/cgraphunit.c:2472
0x75d858 symbol_table::compile()
../../source/gcc/cgraphunit.c:2823
0x6963d1 lto_main()
../../source/gcc/lto/lto.c:653
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: /home/gary/gcc_expt_build/install/bin/gcc returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
./script: line 10: ./exe: No such file or directory



CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Ampere Computing or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. Any review, copying, or distribution of this email (or any attachments thereto) is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.


More information about the Gcc mailing list