[Bug tree-optimization/97717] New: compilation with -O(1/2/3) flag failed while -O0 succeeds

2020-11-04 Thread kranti.rkiran at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97717

Bug ID: 97717
   Summary: compilation with -O(1/2/3) flag failed while -O0
succeeds
   Product: gcc
   Version: 9.3.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: tree-optimization
  Assignee: unassigned at gcc dot gnu.org
  Reporter: kranti.rkiran at gmail dot com
  Target Milestone: ---

GCC version: 9.3.0

System Info: 
System:Host: T-RAGOLI-X1Yoga Kernel: 4.4.0-18362-Microsoft x86_64 bits: 64 
   Console: tty 2 Distro: Ubuntu 20.04 LTS (Focal Fossa) 
CPU:   Topology: Dual Core model: Intel Core i7-6600U bits: 64 type: MT MCP 
   L2 cache: 256 KiB 
   Speed: 2808 MHz min/max: N/A Core speeds (MHz): 1: 2808 2: 2808 3:
2808 4: 2808 
(The machine uses WSL-2)

Compiling the source code with optimization fags (-O1/-O2/-O3) throws a
compiler segfault.
Command: g++ -O3 test.cpp
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus

The compilation using 'g++ test.cpp' succeeds.

[Bug tree-optimization/97717] compilation with -O(1/2/3) flag failed while -O0 succeeds

2020-11-04 Thread kranti.rkiran at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97717

Rahul Kranti Kiran  changed:

   What|Removed |Added

 CC||kranti.rkiran at gmail dot com

--- Comment #1 from Rahul Kranti Kiran  ---
Created attachment 49501
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49501&action=edit
The compressed version of the preprocessed file generated by running 'g++
--save-temps -O3 test.cpp'.

[Bug tree-optimization/97717] compilation with -O(1/2/3) flag failed while -O0 succeeds

2020-11-17 Thread kranti.rkiran at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97717

--- Comment #3 from Rahul Kranti Kiran  ---
The stack size was 8 KB and 'ulimit -s unlimited'  worked for root but gets
reset as soon as I got back to the userspace.

Running the compilation with unlimited stack still threw a SEGFAULT. 

The complete output of ulimit -a, when running as a root. 

core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 7823
max locked memory   (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 65536
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) unlimited
cpu time   (seconds, -t) unlimited
max user processes  (-u) 7823
virtual memory  (kbytes, -v) unlimited
file locks  (-x) unlimited

Yes, the compilation was just using -O3 flag.
Apologies for the delayed reply.