public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "141242068 at smail dot nju.edu.cn" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c/111882] New: GCC: 14: internal compiler error: in get_expr_operands, at tree-ssa-operands.cc:940
Date: Thu, 19 Oct 2023 16:32:47 +0000	[thread overview]
Message-ID: <bug-111882-4@http.gcc.gnu.org/bugzilla/> (raw)

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

            Bug ID: 111882
           Summary: GCC: 14: internal compiler error: in
                    get_expr_operands, at tree-ssa-operands.cc:940
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 141242068 at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://gcc.godbolt.org/z/h9MMnxbvK

When compile this program with option -O2, gcc crashes:
```
static void __attribute__((noipa)) f(int n) {
  int i, j;
  struct S { char d[n]; int a; int b : 17; int c : 12; };
  struct S A[100][1111];
  for (i = 0; i < 100; i++) {
    asm volatile("" : : "g"(&A[0][0]) : "memory");
    for (j = 0; j < 1111; j++) A[i][j].b = 2;
  }
}

void g(void) { f(1); }
```

The stack dump:
```
unhandled expression in get_expr_operands():
 <save_expr 0x7fe6f6035440
    type <integer_type 0x7fe6f5ea55e8 int sizes-gimplified asm_written public
SI
        size <integer_cst 0x7fe6f5ea7180 constant 32>
        unit-size <integer_cst 0x7fe6f5ea7198 constant 4>
        align:32 warn_if_not_align:0 symtab:-167332928 alias-set 3
canonical-type 0x7fe6f5ea55e8 precision:32 min <integer_cst 0x7fe6f5ea7138
-2147483648> max <integer_cst 0x7fe6f5ea7150 2147483647>
        pointer_to_this <pointer_type 0x7fe6f5eadb28>>
    side-effects public
    arg:0 <var_decl 0x7fe6f5e94f30 n.0 type <integer_type 0x7fe6f5ea55e8 int>
        used ignored SI <source>:3:10 size <integer_cst 0x7fe6f5ea7180 32>
unit-size <integer_cst 0x7fe6f5ea7198 4>
        align:32 warn_if_not_align:0 context <function_decl 0x7fe6f6033b00 f>>>

during GIMPLE pass: ifcvt
<source>: In function 'f':
<source>:1:36: internal compiler error: in get_expr_operands, at
tree-ssa-operands.cc:940
    1 | static void __attribute__((noipa)) f(int n) {
      |                                    ^
0x231788e internal_error(char const*, ...)
        ???:0
0xa0002a fancy_abort(char const*, int, char const*)
        ???:0
0x12e792d operands_scanner::get_expr_operands(tree_node**, int)
        ???:0
0x12e71b8 operands_scanner::get_expr_operands(tree_node**, int)
        ???:0
0x12e71b8 operands_scanner::get_expr_operands(tree_node**, int)
        ???:0
0x12e71b8 operands_scanner::get_expr_operands(tree_node**, int)
        ???:0
0x12e7e50 operands_scanner::parse_ssa_operands()
        ???:0
0x12e8cfa operands_scanner::build_ssa_operands()
        ???:0
0x12e8f44 update_stmt_operands(function*, gimple*)
        ???:0
0xd66fec gsi_insert_before(gimple_stmt_iterator*, gimple*, gsi_iterator_update)
        ???:0
0x1196551 tree_if_conversion(loop*, vec<gimple*, va_heap, vl_ptr>*)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```

             reply	other threads:[~2023-10-19 16:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19 16:32 141242068 at smail dot nju.edu.cn [this message]
2023-10-19 16:36 ` [Bug tree-optimization/111882] [13/14 Regression] : internal compiler error: in get_expr_operand in ifcvt pinskia at gcc dot gnu.org
2023-10-19 16:39 ` [Bug tree-optimization/111882] [13/14 Regression] : internal compiler error: in get_expr_operand in ifcvt with Variable length arrays inside a struct pinskia at gcc dot gnu.org
2023-10-19 16:43 ` [Bug tree-optimization/111882] [13/14 Regression] : internal compiler error: in get_expr_operand in ifcvt with Variable length arrays and bitfields " pinskia at gcc dot gnu.org
2023-10-20  6:49 ` rguenth at gcc dot gnu.org
2023-10-20  9:55 ` avieira at gcc dot gnu.org
2023-10-20 16:03 ` cvs-commit at gcc dot gnu.org
2024-04-30 16:50 ` [Bug tree-optimization/111882] [13 " avieira at gcc dot gnu.org
2024-05-02 21:22 ` ricbal02 at gcc dot gnu.org
2024-05-03 10:10 ` cvs-commit at gcc dot gnu.org
2024-05-08 12:48 ` rguenth at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-111882-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).