public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/107557] New: [12/13 Regression] ICE in make_ssa_name_fn, at tree-ssanames.cc:360
@ 2022-11-07 18:12 gscfq@t-online.de
  2022-11-07 18:12 ` [Bug c/107557] " gscfq@t-online.de
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: gscfq@t-online.de @ 2022-11-07 18:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107557
           Summary: [12/13 Regression] ICE in make_ssa_name_fn, at
                    tree-ssanames.cc:360
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Started between 20210822 and 20210905 at -O3|-Ofast, with file
llvm-project-llvmorg-14.0.6/clang/test/CodeGen/vlt_to_pointer.c :


$ cat z1.c
int c[1][3*2];
int f(int * const m, int (**v)[*m * 2])
{
  return &(c[0][*m]) == &((*v)[0][*m]);
}
int test(int n, int (*(*fn)(void))[n])
{
  return (*fn())[0];
}
int main()
{
  int m = 3;
  int (*d)[3*2] = c;
  int (*fn[m])(void);
  return f(&m, &d) + test(m, &fn);
}


$ gcc-13-20221106 -c z1.c -m32 -Ofast -fnon-call-exceptions -ftrapv
-fsanitize=undefined
z1.c: In function 'main':
z1.c:15:30: warning: passing argument 2 of 'test' from incompatible pointer
type [-Wincompatible-pointer-types]
   15 |   return f(&m, &d) + test(m, &fn);
      |                              ^~~
      |                              |
      |                              int (* (*)[(((m) <= 0 ?
__builtin___ubsan_handle_vla_bound_not_positive(&*.Lubsan_data0, (unsigned
int)(m)) : (void)0, (m))) - 1])(void)
z1.c:6:25: note: expected 'int (* (*)(void))[(n) - 1]' but argument is of type
'int (* (*)[(((m) <= 0 ?
__builtin___ubsan_handle_vla_bound_not_positive(&*.Lubsan_data0, (unsigned
int)(m)) : (void)0, (m))) - 1])(void)'
    6 | int test(int n, int (*(*fn)(void))[n])
      |                 ~~~~~~~~^~~~~~~~~~~~~
during GIMPLE pass: einline
z1.c:15:22: internal compiler error: in make_ssa_name_fn, at
tree-ssanames.cc:360
   15 |   return f(&m, &d) + test(m, &fn);
      |                      ^~~~~~~~~~~~
0xf0e385 make_ssa_name_fn(function*, tree_node*, gimple*, unsigned int)
        ../../gcc/tree-ssanames.cc:357
0xd7104e make_ssa_name
        ../../gcc/tree-ssanames.h:97
0xd7104e remap_ssa_name
        ../../gcc/tree-inline.cc:237
0xd74257 copy_tree_body_r(tree_node**, int*, void*)
        ../../gcc/tree-inline.cc:1226
0xfa17b2 walk_tree_1(tree_node**, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*,
tree_node* (*)(tree_node**, int*, tree_node* (*)(tree_node**, int*, void*),
void*, hash_set<tree_node*, false, default_hash_traits<tree_node*> >*))
        ../../gcc/tree.cc:11281
0xd70124 remap_type_1
        ../../gcc/tree-inline.cc:596
0xd70498 remap_type(tree_node*, copy_body_data*)
        ../../gcc/tree-inline.cc:713
0xd7037e remap_type_1
        ../../gcc/tree-inline.cc:532
0xd70498 remap_type(tree_node*, copy_body_data*)
        ../../gcc/tree-inline.cc:713
0xd70057 remap_type_1
        ../../gcc/tree-inline.cc:425
0xd70498 remap_type(tree_node*, copy_body_data*)
        ../../gcc/tree-inline.cc:713
0xd700e6 remap_type_1
        ../../gcc/tree-inline.cc:509
0xd70498 remap_type(tree_node*, copy_body_data*)
        ../../gcc/tree-inline.cc:713
0xd70057 remap_type_1
        ../../gcc/tree-inline.cc:425
0xd70498 remap_type(tree_node*, copy_body_data*)
        ../../gcc/tree-inline.cc:713
0xd7918c initialize_inlined_parameters
        ../../gcc/tree-inline.cc:3659
0xd7918c expand_call_inline
        ../../gcc/tree-inline.cc:5020
0xd7af89 gimple_expand_calls_inline
        ../../gcc/tree-inline.cc:5323
0xd7af89 optimize_inline_calls(tree_node*)
        ../../gcc/tree-inline.cc:5495
0x190544e early_inliner(function*)
        ../../gcc/ipa-inline.cc:3038

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

end of thread, other threads:[~2023-11-15  7:45 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07 18:12 [Bug c/107557] New: [12/13 Regression] ICE in make_ssa_name_fn, at tree-ssanames.cc:360 gscfq@t-online.de
2022-11-07 18:12 ` [Bug c/107557] " gscfq@t-online.de
2022-11-07 20:10 ` pinskia at gcc dot gnu.org
2022-11-08  9:29 ` [Bug c/107557] [12/13 Regression] ICE -fsanitize=undefined and VLA as argument type to a function rguenth at gcc dot gnu.org
2022-11-21 12:33 ` marxin at gcc dot gnu.org
2023-01-13 12:40 ` rguenth at gcc dot gnu.org
2023-01-21 19:23 ` muecker at gwdg dot de
2023-02-11 15:07 ` muecker at gwdg dot de
2023-02-24 14:40 ` muecker at gwdg dot de
2023-04-09 11:54 ` muecker at gwdg dot de
2023-05-08 12:25 ` [Bug c/107557] [12/13/14 " rguenth at gcc dot gnu.org
2023-05-18 12:57 ` muecker at gwdg dot de
2023-05-23 20:05 ` cvs-commit at gcc dot gnu.org
2023-11-15  7:17 ` sjames at gcc dot gnu.org
2023-11-15  7:45 ` uecker 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).