public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/94179] New: [10 Regression] ICE in gimplify_expr, at gimplify.c:14399 since r10-7127-gcb99630f254aaec6
@ 2020-03-15 12:18 marxin at gcc dot gnu.org
  2020-03-15 12:19 ` [Bug c/94179] " marxin at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: marxin at gcc dot gnu.org @ 2020-03-15 12:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 94179
           Summary: [10 Regression] ICE in gimplify_expr, at
                    gimplify.c:14399 since r10-7127-gcb99630f254aaec6
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

I see the following ICE isolated from xf86-video-intel package:

$ cat kgem.i
struct kgem_bo {
  int rq;
  int list;
  int pinned_batches[];
} a;

void
fn1() {
  int b = (struct kgem_bo *)((char *)a.pinned_batches[b > 4096] -
                             (char *)&((struct kgem_bo *)0)->list);
}

$ gcc kgem.i -c
kgem.i: In function ‘fn1’:
kgem.i:9:30: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
    9 |   int b = (struct kgem_bo *)((char *)a.pinned_batches[b > 4096] -
      |                              ^
kgem.i:9:11: warning: initialization of ‘int’ from ‘struct kgem_bo *’ makes
integer from pointer without a cast [-Wint-conversion]
    9 |   int b = (struct kgem_bo *)((char *)a.pinned_batches[b > 4096] -
      |           ^
kgem.i:9:57: internal compiler error: in gimplify_expr, at gimplify.c:14399
    9 |   int b = (struct kgem_bo *)((char *)a.pinned_batches[b > 4096] -
      |                                                       ~~^~~~~~
0x69d747 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:14399
0xb83ce1 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:14369
0xb8409f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13705
0xb8b079 gimplify_compound_lval
        /home/marxin/Programming/gcc/gcc/gimplify.c:3079
0xb83845 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13554
0xb8409f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13705
0xb8409f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13705
0xb8641e gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13761
0xb8c625 gimplify_addr_expr
        /home/marxin/Programming/gcc/gcc/gimplify.c:6171
0xb84284 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13649
0xb8409f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13705
0xb8409f gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13705
0xb81ce7 gimplify_modify_expr
        /home/marxin/Programming/gcc/gcc/gimplify.c:5766
0xb83e98 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13602
0xb87976 gimplify_stmt(tree_node**, gimple**)
        /home/marxin/Programming/gcc/gcc/gimplify.c:6823
0xb90518 gimplify_and_add(tree_node*, gimple**)
        /home/marxin/Programming/gcc/gcc/gimplify.c:486
0xb90518 gimplify_decl_expr
        /home/marxin/Programming/gcc/gcc/gimplify.c:1816
0xb8509d gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        /home/marxin/Programming/gcc/gcc/gimplify.c:13799
0xb87976 gimplify_stmt(tree_node**, gimple**)
        /home/marxin/Programming/gcc/gcc/gimplify.c:6823
0xb886fe gimplify_bind_expr
        /home/marxin/Programming/gcc/gcc/gimplify.c:1424
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] 7+ messages in thread

end of thread, other threads:[~2020-03-16 22:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-15 12:18 [Bug c/94179] New: [10 Regression] ICE in gimplify_expr, at gimplify.c:14399 since r10-7127-gcb99630f254aaec6 marxin at gcc dot gnu.org
2020-03-15 12:19 ` [Bug c/94179] " marxin at gcc dot gnu.org
2020-03-15 12:31 ` marxin at gcc dot gnu.org
2020-03-15 16:31 ` jakub at gcc dot gnu.org
2020-03-16  7:41 ` rguenth at gcc dot gnu.org
2020-03-16 21:59 ` cvs-commit at gcc dot gnu.org
2020-03-16 22:00 ` jakub 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).