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

            Bug ID: 94479
           Summary: NetBSD: internal compiler error: in
                    recompute_tree_invariant_for_addr_expr
           Product: gcc
           Version: 9.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tk at giga dot or.at
  Target Milestone: ---

When compiling git-2.26.0 with gcc 8.3.0, 8.4.0, or 9.3.0 on NetBSD/amd64 with
-fstack-check, I see (output from 8.4.0):


builtin/rebase.c: In function 'cmd_rebase__interactive':
builtin/rebase.c:473:41: internal compiler error: in
recompute_tree_invariant_for_addr_expr, at tree.c:4487
   { OPTION_CALLBACK, 'k', "keep-empty", &options, NULL,
                                         ^~~~~~~~

I used creduce to get a minimal test case, save the following to rebase.i and
run:
# gcc -o rebase.o -c -fstack-check rebase.i

---- begin ----
int a;
struct b {
  char c;
  void *d;  
};
struct b e() {
  struct b f[] = {{}, "", f, a};
}
---- end ----

I tried running this in 8.3.0 and 9.3.0 on https://godbolt.org/ (where I had to
add -fpermissive for it to compile) but it doesn't seem to trigger the problem
there. So perhaps it's fine on Linux.

Reply via email to