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

            Bug ID: 104757
           Summary: [12 Regression] ICE (segfault) GIMPLE pass: walloca -
                    in gimple_range_global
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

This requires that
   ENABLE_OFFLOADING
is true (affects gcc/*.cc; e.g. by s/ENABLE_OFFLOADING/true/ inside gcc/*.cc).

Plus the following environment variable has to be set
OFFLOAD_TARGET_NAMES=nvptx-none
(This value, using something else [like amdgcn-amdhsa] does not ICE.)


Afterwards, the fail is:

  export OFFLOAD_TARGET_NAMES=nvptx-none
  f951 -quiet -O -fopenmp testsuite/gfortran.dg/gomp/clauses-1.f90

during GIMPLE pass: walloca
testsuite/gfortran.dg/gomp/clauses-1.f90:61:14:

   61 |     ll = ll +1
      |              ^
internal compiler error: Segmentation fault
0x100e603 crash_signal
        ../../repos/gcc/gcc/toplev.cc:322
0x13246be gimple_range_global(tree_node*)
        ../../repos/gcc/gcc/value-query.cc:424
0x1d2d910 ranger_cache::get_global_range(irange&, tree_node*) const
        ../../repos/gcc/gcc/gimple-range-cache.cc:923
0x1d2d910 ranger_cache::get_global_range(irange&, tree_node*) const

Reply via email to