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

            Bug ID: 98234
           Summary: [11 Regression] OOM at -O2 for PR91257 testcase
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rguenth at gcc dot gnu.org
  Target Milestone: ---

> /usr/bin/time gcc-10 -S pr91257.c -O2
pr91257.c: In function 'gen_opt':
pr91257.c:291:6: warning: implicit declaration of function 'asdf'
[-Wimplicit-function-declaration]
  291 | v0 = asdf(41, 28120, 584);
      |      ^~~~
pr91257.c:294:1: warning: implicit declaration of function 'call_err'
[-Wimplicit-function-declaration]
  294 | call_err(reg);
      | ^~~~~~~~
28.60user 0.41system 0:29.04elapsed 99%CPU (0avgtext+0avgdata
1377844maxresident)k
49464inputs+0outputs (7major+648860minor)pagefaults 0swaps

> /usr/bin/time ~/install/gcc-11.0/usr/local/bin/gcc -S pr91257.c -O2
pr91257.c: In function 'gen_opt':
pr91257.c:291:6: warning: implicit declaration of function 'asdf'
[-Wimplicit-function-declaration]
  291 | v0 = asdf(41, 28120, 584);
      |      ^~~~
pr91257.c:294:1: warning: implicit declaration of function 'call_err'
[-Wimplicit-function-declaration]
  294 | call_err(reg);
      | ^~~~~~~~
gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
Command exited with non-zero status 1
23.79user 5.15system 0:30.29elapsed 95%CPU (0avgtext+0avgdata
32175084maxresident)k
388216inputs+0outputs (4037major+8529324minor)pagefaults 0swaps

at ~7GB a backtrace is

#0  0x00007ffff739c2e7 in __memset_avx2_unaligned_erms () from /lib64/libc.so.6
#1  0x0000000001803865 in ssa_block_ranges::ssa_block_ranges (
    this=0x1b0593ab0, t=0x7ffff70595e8, allocator=<optimized out>)
    at /home/rguenther/src/trunk/gcc/gimple-range-cache.cc:147
#2  0x0000000001803eb9 in block_range_cache::get_block_ranges (this=0x290a238, 
    name=<optimized out>) at /home/rguenther/src/trunk/gcc/tree.h:3450
#3  0x0000000001804758 in block_range_cache::set_bb_range (r=..., 
    bb=0x7ffff6f36410, name=0x7fffddb457e0, this=0x290a238)
    at /home/rguenther/src/trunk/gcc/gimple-range-cache.cc:1016
#4  ranger_cache::fill_block_cache (this=0x290a0e0, name=0x7fffddb457e0, 
    bb=0x7ffff6f36410, def_bb=0x7ffff6f363a8)
    at /home/rguenther/src/trunk/gcc/gimple-range-cache.cc:1016
...
#16 0x000000000180c017 in execute_early_vrp ()
    at /home/rguenther/src/trunk/gcc/gimple-ssa-evrp.c:349

and finishing frames never leaves EVRP before going OOM.

-O2 -fno-tree-vrp finishes with

30.27user 0.42system 0:30.76elapsed 99%CPU (0avgtext+0avgdata
1555304maxresident)k
62736inputs+0outputs (72major+610841minor)pagefaults 0swaps

Reply via email to