public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/100786] New: ICE: in fold_convert_loc, at fold-const.c:2429
@ 2021-05-27  1:28 cnsun at uwaterloo dot ca
  2021-05-27  3:19 ` [Bug middle-end/100786] ICE: in fold_convert_loc with alias attribute and different types and different sizes pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: cnsun at uwaterloo dot ca @ 2021-05-27  1:28 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 100786
           Summary: ICE: in fold_convert_loc, at fold-const.c:2429
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: cnsun at uwaterloo dot ca
  Target Milestone: ---

$ gcc-trunk -v
Using built-in specs.
COLLECT_GCC=gcc-trunk
COLLECT_LTO_WRAPPER=/scratch/software/gcc-trunk/libexec/gcc/x86_64-pc-linux-gnu/12.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/configure
--enable-languages=c,c++,lto --enable-checking-yes --enable-multiarch
--prefix=/scratch/software/gcc-trunk --disable-bootstrap
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.0.0 20210526 (experimental) [master revision
:21638bbbf:1fd76b24306ed4df4cf9e797d900699ed59ce7f7] (GCC)

$ cat mutant.c
const double a = 0;
extern b __attribute__((alias("a")));
inc() { b++; }

$ gcc-trunk  mutant.c
mutant.c:2:8: warning: type defaults to ‘int’ in declaration of ‘b’
[-Wimplicit-int]
    2 | extern b __attribute__((alias("a")));
      |        ^
mutant.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
    3 | inc() { b++; }
      | ^~~
mutant.c: In function ‘inc’:
mutant.c:3:10: internal compiler error: in fold_convert_loc, at
fold-const.c:2429
    3 | inc() { b++; }
      |         ~^~
0x6bfba3 fold_convert_loc(unsigned int, tree_node*, tree_node*)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/fold-const.c:2429
0xc085b7 fold_stmt_1
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimple-fold.c:6251
0xc3cbf2 gimplify_modify_expr
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:6000
0xc2c1f8 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:13965
0xc2fb2a gimplify_stmt(tree_node**, gimple**)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:6883
0xc31ce6 gimplify_and_add(tree_node*, gimple**)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:492
0xc31ce6 internal_get_tmp_var
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:645
0xc2b777 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:14954
0xc2bf91 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:14720
0xc3ca07 gimplify_modify_expr
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:5824
0xc2c1f8 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:13965
0xc2fb2a gimplify_stmt(tree_node**, gimple**)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:6883
0xc3035e gimplify_bind_expr
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:1424
0xc2c593 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:14166
0xc2fb2a gimplify_stmt(tree_node**, gimple**)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:6883
0xc31123 gimplify_body(tree_node*, bool)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:15210
0xc31571 gimplify_function_tree(tree_node*)
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/gimplify.c:15364
0xa842c7 cgraph_node::analyze()
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/cgraphunit.c:670
0xa871f1 analyze_functions
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/cgraphunit.c:1234
0xa87cc1 symbol_table::finalize_compilation_unit()
        /tmp/tmp.tVhv2eaPzV-gcc-builder/gcc/gcc/cgraphunit.c:2508
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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-05-06 11:11 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-27  1:28 [Bug c/100786] New: ICE: in fold_convert_loc, at fold-const.c:2429 cnsun at uwaterloo dot ca
2021-05-27  3:19 ` [Bug middle-end/100786] ICE: in fold_convert_loc with alias attribute and different types and different sizes pinskia at gcc dot gnu.org
2021-12-10  2:52 ` [Bug middle-end/100786] [9/10/11/12 Regression] " pinskia at gcc dot gnu.org
2022-01-20 13:29 ` rguenth at gcc dot gnu.org
2022-01-20 15:50 ` cvs-commit at gcc dot gnu.org
2022-01-20 15:51 ` [Bug middle-end/100786] [9/10/11 " rguenth at gcc dot gnu.org
2022-02-17  9:06 ` cvs-commit at gcc dot gnu.org
2022-04-21 12:52 ` [Bug middle-end/100786] [9/10 " cvs-commit at gcc dot gnu.org
2022-05-06 11:08 ` [Bug middle-end/100786] [9 " cvs-commit at gcc dot gnu.org
2022-05-06 11:11 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).