public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/112509] New: GCC: 14: internal compiler error: in verify_range, at value-range.cc:1132
@ 2023-11-13 11:59 141242068 at smail dot nju.edu.cn
  2023-11-13 12:26 ` [Bug tree-optimization/112509] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-11-13 11:59 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112509
           Summary: GCC: 14: internal compiler error: in verify_range, at
                    value-range.cc:1132
           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/151vEnafj

When compiling this program with `gcc-14 -O2 -fno-tree-vrp -fno-tree-fre
-fno-tree-forwprop`, gcc crashes:

```
struct S {
  unsigned j : 3;
};
int k, l, m_1 = {0};
void f(int l, struct S x) {
  unsigned int k_1;
  while (m_1 % 8) switch (x.j) {
    case 1:
    case 3:
    case 4:
    case 6:
    case 2:
    case 5: l = m_1;
    case 7:
    case 0: k_1 = 0;
    default: break;
    }
}
void foo(struct S x) { f(l, x); }
```

The crash output:
```
during GIMPLE pass: dom
<source>: In function 'f':
<source>:5:6: internal compiler error: in verify_range, at value-range.cc:1132
    5 | void f(int l, struct S x) {
      |      ^
0x238b06e internal_error(char const*, ...)
        ???:0
0xa1125c fancy_abort(char const*, int, char const*)
        ???:0
0x148ea37 irange::set(tree_node*, generic_wide_int<wide_int_storage> const&,
generic_wide_int<wide_int_storage> const&, value_range_kind)
        ???:0
0x144ca1f find_case_label_range(gswitch*, irange const*)
        ???:0
0x139e1ef hybrid_jt_simplifier::simplify(gimple*, gimple*, basic_block_def*,
jt_state*)
        ???:0
0x139d525 jump_threader::simplify_control_stmt_condition(edge_def*, gimple*)
        ???:0
0x139db5a jump_threader::thread_through_normal_block(vec<jump_thread_edge*,
va_heap, vl_ptr>*, edge_def*, bitmap_head*)
        ???:0
0x139fa66 jump_threader::thread_across_edge(edge_def*)
        ???:0
0x139fc5a jump_threader::thread_outgoing_edges(basic_block_def*)
        ???:0
0x126f828 dom_opt_dom_walker::after_dom_children(basic_block_def*)
        ???:0
0x1ed3f2f dom_walker::walk(basic_block_def*)
        ???: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.
Compiler returned: 1
```

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-13 11:59 [Bug c/112509] New: GCC: 14: internal compiler error: in verify_range, at value-range.cc:1132 141242068 at smail dot nju.edu.cn
2023-11-13 12:26 ` [Bug tree-optimization/112509] " rguenth at gcc dot gnu.org
2023-11-13 14:46 ` amacleod at redhat dot com
2023-11-14  6:03 ` [Bug tree-optimization/112509] [14 Regression] " pinskia at gcc dot gnu.org
2023-11-14 15:33 ` cvs-commit at gcc dot gnu.org
2023-11-14 15:34 ` amacleod at redhat dot com

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).