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

            Bug ID: 89656
           Summary: [9 Regression] profiledbootstrap failure on
                    aarch64-linux since r269453
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
  Target Milestone: ---

aarch64-linux profiledbootstrap --enable-checking=release currently fails:
/builddir/build/BUILD/gcc-9.0.1-20190309/obj-aarch64-redhat-linux/./prev-gcc/xg++
-B/builddir/build/BUILD/gcc-9.0.1-20190309/obj-aarch64-redhat-linux/./prev-gcc/
-B/usr/aarch64-redhat-linux/bin/ -nostdinc++
-B/builddir/build/BUILD/gcc-9.0.1-20190309/obj-aarch64-redhat-linux/prev-aarch64-redhat-linux/libstdc++-v3/src/.libs
-B/builddir/build/BUILD/gcc-9.0.1-20190309/obj-aarch64-redhat-linux/prev-aarch64-redhat-linux/libstdc++-v3/libsupc++/.libs

-I/builddir/build/BUILD/gcc-9.0.1-20190309/obj-aarch64-redhat-linux/prev-aarch64-redhat-linux/libstdc++-v3/include/aarch64-redhat-linux

-I/builddir/build/BUILD/gcc-9.0.1-20190309/obj-aarch64-redhat-linux/prev-aarch64-redhat-linux/libstdc++-v3/include
 -I/builddir/build/BUILD/gcc-9.0.1-20190309/libstdc++-v3/libsupc++
-L/builddir/build/BUILD/gcc-9.0.1-20190309/obj-aarch64-redhat-linux/prev-aarch64-redhat-linux/libstdc++-v3/src/.libs
-L/builddir/build/BUILD/gcc-9.0.1-20190309/obj-aarch64-redhat-linux/prev-aarch64-redhat-linux/libstdc++-v3/libsupc++/.libs
-c   -O2 -g -Wall -Wformat-security -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions
-fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables
-fstack-clash-protection -fprofile-use -DIN_GCC     -fno-exceptions -fno-rtti
-fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings
-Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic
-Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../../gcc -I../../gcc/build
-I../../gcc/../include  -I../../gcc/../libcpp/include  \
        -o build/genoutput.o ../../gcc/genoutput.c
virtual memory exhausted: Cannot allocate memory

The problem is that during dom when processing:
<bb 9> [count: 0]:
# p0_9 = PHI <""(93)>
# DEBUG p0 => ""
# DEBUG BEGIN_STMT
# DEBUG D#80 => MEM[(struct operand_data *)d_28(D) + 72B].predicate
# DEBUG p1 => D#80
# DEBUG BEGIN_STMT
# DEBUG p1 => pretmp_83
# DEBUG BEGIN_STMT
_81 = strcmp (p0_9, pretmp_83);
if (_81 != 0)
  goto <bb 20>; [42.83%]
else
  goto <bb 10>; [57.17%]
we fold_stmt
_81 = strcmp (p0_9, pretmp_83);
into
_17 = MEM[(const unsigned char * {ref-all})pretmp_83];
_167 = (int) _17;
_81 = -_167;
but vr_values has been constructed with num_vr_values of 167 and when we try to
optimize_stmt the folded _167 = (int) _17, we first ask for value range of _167
and get:
  /* If we query the range for a new SSA name return an unmodifiable VARYING.
     We should get here at most from the substitute-and-fold stage which
     will never try to change values.  */
  if (ver >= num_vr_values)
    return CONST_CAST (value_range *, &vr_const_varying);
and then update_value_range to the [0, 255] range derived from the stmt.  That
modifies the shared const vr_const_varying variable and all goes wrong from
there.

Reply via email to