https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103851
Bug ID: 103851 Summary: ICE in gimple_range_global at gcc/value-query.cc:424 since r12-3433-ga25e0b5e6ac8a77a Product: gcc Version: 12.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: tree-optimization Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: qing.zhao at oracle dot com, rguenth at gcc dot gnu.org Target Milestone: --- The following ICEs: $ cat inkscape.ii struct pointer_traits { template <typename _Up> using rebind = _Up *; }; template <typename, typename _Tp> using __ptr_rebind = pointer_traits::rebind<_Tp>; struct _Deque_iterator { __ptr_rebind<int, int> _M_cur; }; struct _Deque_base { long _M_map_size; _Deque_iterator _M_start; _Deque_iterator _M_finish; }; enum { Y }; namespace { template <typename, int, int BPP> void morphologicalFilter1D() { #pragma omp parallel _Deque_base vals[BPP]; } } // namespace void FilterMorphologyrender_cairo() { morphologicalFilter1D<int, Y, 4>; } $ g++ inkscape.ii -fopenmp -c -ftrivial-auto-var-init=pattern during GIMPLE pass: walloca inkscape.ii: In function ‘void {anonymous}::morphologicalFilter1D() [with <template-parameter-1-1> = int; int <anonymous> = 0; int BPP = 4]’: inkscape.ii:18:15: internal compiler error: Segmentation fault 18 | _Deque_base vals[BPP]; | ^~~~ 0x123be8a crash_signal /home/marxin/Programming/gcc/gcc/toplev.c:322 0x7ffff787d42f ??? /usr/src/debug/glibc-2.34-4.1.x86_64/signal/../sysdeps/unix/sysv/linux/x86_64/libc_sigaction.c:0 0x153b0f0 gimple_range_global(tree_node*) /home/marxin/Programming/gcc/gcc/value-query.cc:424 0x1f5d015 ranger_cache::get_global_range(irange&, tree_node*) const /home/marxin/Programming/gcc/gcc/gimple-range-cache.cc:933 0x1f5d015 ranger_cache::get_global_range(irange&, tree_node*) const /home/marxin/Programming/gcc/gcc/gimple-range-cache.cc:929 0x1f59c34 gimple_ranger::export_global_ranges() /home/marxin/Programming/gcc/gcc/gimple-range.cc:453 0x1f98895 pass_walloca::execute(function*) /home/marxin/Programming/gcc/gcc/gimple-ssa-warn-alloca.c:381 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.