https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71071
Thomas Schwinge <tschwinge at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tschwinge at gcc dot gnu.org --- Comment #11 from Thomas Schwinge <tschwinge at gcc dot gnu.org> --- Created attachment 38481 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38481&action=edit pre-rpcessed newlib/libc/stdlib/dtoa.c for nvptx-none I also bisected a nvptx-none "fold check" ICE to be caused/triggered by the recent r236117: build-gcc-offload-nvptx-none/gcc/cc1 -fpreprocessed dtoa.i -g -O2 -fno-builtin quorem _dtoa_r [...]/source-gcc/newlib/libc/stdlib/dtoa.c: In function '_dtoa_r': [...]/source-gcc/newlib/libc/stdlib/dtoa.c:269:2: internal compiler error: fold check: original tree changed by fold "NaN"; ^~~~~ #1 0x000000000050fe29 in fold_check_failed (ret=<optimized out>, expr=0x7ffff6a4b640) at [...]/source-gcc/gcc/fold-const.c:12099 #2 0x00000000007f4f48 in fold_build2_stat_loc (loc=loc@entry=2147483836, code=code@entry=TRUTH_ANDIF_EXPR, type=0x7ffff68d2690, op0=op0@entry=0x7ffff6a4b640, op1=0x7ffff6a4b668) at [...]/source-gcc/gcc/fold-const.c:12358 #3 0x00000000005d7090 in c_fully_fold_internal (expr=expr@entry=0x7ffff6a4b618, in_init=in_init@entry=false, maybe_const_operands=maybe_const_operands@entry=0x7fffffffbf0a, maybe_const_itself=maybe_const_itself@entry=0x7fffffffbf0d, for_int_const=for_int_const@entry=false) at [...]/source-gcc/gcc/c/c-fold.c:457 #4 0x00000000005d521a in c_fully_fold_internal (expr=expr@entry=0x7ffff6a4a4b0, in_init=in_init@entry=false, maybe_const_operands=maybe_const_operands@entry=0x7fffffffbf5e, maybe_const_itself=maybe_const_itself@entry=0x7fffffffbf5f, for_int_const=for_int_const@entry=false) at [...]/source-gcc/gcc/c/c-fold.c:482 #5 0x00000000005d840b in c_fully_fold (expr=expr@entry=0x7ffff6a4a4b0, in_init=in_init@entry=false, maybe_const=0x7fffffffbf5e, maybe_const@entry=0x0) at [...]/source-gcc/gcc/c/c-fold.c:90 #6 0x0000000000595803 in build_modify_expr (location=location@entry=45810496, lhs=lhs@entry=0x7ffff6a49240, lhs_origtype=lhs_origtype@entry=0x7ffff68e4a80, modifycode=modifycode@entry=NOP_EXPR, rhs_loc=rhs_loc@entry=45818464, rhs=<optimized out>, rhs@entry=0x7ffff6a4a4b0, rhs_origtype=rhs_origtype@entry=0x7ffff68e4a80) at [...]/source-gcc/gcc/c/c-typeck.c:5697 #7 0x00000000005a674d in c_parser_expr_no_commas (parser=parser@entry=0x7ffff6995000, after=after@entry=0x0, omp_atomic_lhs=omp_atomic_lhs@entry=0x0) at [...]/source-gcc/gcc/c/c-parser.c:6313 #8 0x00000000005a6da5 in c_parser_expression (parser=parser@entry=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:8450 #9 0x00000000005a78aa in c_parser_expression_conv (parser=parser@entry=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:8483 #10 0x00000000005be3da in c_parser_statement_after_labels (parser=parser@entry=0x7ffff6995000, if_p=if_p@entry=0x0, chain=chain@entry=0x0) at [...]/source-gcc/gcc/c/c-parser.c:5285 #11 0x00000000005c034c in c_parser_compound_statement_nostart (parser=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:4859 #12 0x00000000005c0c3f in c_parser_compound_statement (parser=parser@entry=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:4694 #13 0x00000000005bfcfd in c_parser_if_body (if_tinfo=..., if_p=0x7fffffffc3ff, parser=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:5384 #14 c_parser_if_statement (chain=0x0, if_p=0x0, parser=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:5502 #15 c_parser_statement_after_labels (parser=parser@entry=0x7ffff6995000, if_p=if_p@entry=0x0, chain=chain@entry=0x0) at [...]/source-gcc/gcc/c/c-parser.c:5139 #16 0x00000000005c034c in c_parser_compound_statement_nostart (parser=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:4859 #17 0x00000000005c0c3f in c_parser_compound_statement (parser=parser@entry=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:4694 #18 0x00000000005c2111 in c_parser_declaration_or_fndef (parser=parser@entry=0x7ffff6995000, fndef_ok=fndef_ok@entry=true, static_assert_ok=static_assert_ok@entry=true, empty_ok=empty_ok@entry=true, nested=nested@entry=false, start_attr_ok=start_attr_ok@entry=true, objc_foreach_object_declaration=objc_foreach_object_declaration@entry=0x0, omp_declare_simd_clauses=..., omp_declare_simd_clauses@entry=..., oacc_routine_clauses=oacc_routine_clauses@entry=0x0) at [...]/source-gcc/gcc/c/c-parser.c:2106 #19 0x00000000005cb797 in c_parser_external_declaration (parser=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:1550 #20 0x00000000005cc2aa in c_parser_translation_unit (parser=0x7ffff6995000) at [...]/source-gcc/gcc/c/c-parser.c:1431 #21 c_parse_file () at [...]/source-gcc/gcc/c/c-parser.c:17916 #22 0x0000000000630b43 in c_common_parse_file () at [...]/source-gcc/gcc/c-family/c-opts.c:1064 #23 0x0000000000ae4e9f in compile_file () at [...]/source-gcc/gcc/toplev.c:463 #24 0x000000000054069a in do_compile () at [...]/source-gcc/gcc/toplev.c:1987 #25 toplev::main (this=this@entry=0x7fffffffc770, argc=argc@entry=51, argv=argv@entry=0x7fffffffc878) at [...]/source-gcc/gcc/toplev.c:2095 #26 0x00000000005422f7 in main (argc=51, argv=0x7fffffffc878) at [...]/source-gcc/gcc/main.c:39