From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 79308385840C; Fri, 10 Sep 2021 21:50:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 79308385840C From: "dcb314 at hotmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/102285] New: New flag -ftrivial-auto-var-init=zero causes many crashes in the testsuite Date: Fri, 10 Sep 2021 21:50:08 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dcb314 at hotmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 10 Sep 2021 21:50:08 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102285 Bug ID: 102285 Summary: New flag -ftrivial-auto-var-init=3Dzero causes many crashes in the testsuite Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dcb314 at hotmail dot com Target Milestone: --- For the C source code under gcc/trunk/gcc/testsuite, I did: $ find . -name \*.c -print | sort > file.c.list $ head file.c.list ./ada/acats/tests/cd/cd300051.c ./ada/acats/tests/cxb/cxb30040.c ./ada/acats/tests/cxb/cxb30060.c ./ada/acats/tests/cxb/cxb30130.c ./ada/acats/tests/cxb/cxb30131.c ./c-c++-common/addrtmp.c ./c-c++-common/array-1.c ./c-c++-common/array-5.c ./c-c++-common/array-6.c ./c-c++-common/array-init.c $ wc -l file.c.list 42647 file.c.list $ So I did a bit of light testing: $ for i in `cat file.c.list`; do echo $i; /home/dcb/gcc/results/bin/gcc -c = -g -O2 -Wall -ftrivial-auto-var-init=3Dzero $i; done > 11.out 2>&1=20 $ Normally, this kind of for loop would produce a small number of crashes. Instead, I get 25 and it's only done about 25% of all the C source code fil= es. $ grep -c "\.c$" 11.out=20 9184 $=20 The compiler is built with checking enabled. Here are the first few: $ fgrep "internal compiler error:" 11.out | head ./c-c++-common/dfp/func-vararg-size0.c:16:5: internal compiler error: Segmentation fault ./c-c++-common/dfp/struct-layout-1.c:51:5: internal compiler error: Segmentation fault ./c-c++-common/gomp/reduction-1.c:8:1: internal compiler error: Segmentation fault ./c-c++-common/gomp/udr-1.c:11:1: internal compiler error: Segmentation fau= lt ./c-c++-common/torture/pr46137.c:13:1: internal compiler error: Segmentation fault ./c-c++-common/ubsan/bounds-14.c:6:1: internal compiler error: Segmentation fault ./c-c++-common/Warray-bounds-10.c:63:6: internal compiler error: Segmentati= on fault ./c-c++-common/Warray-bounds-9.c:12:12: internal compiler error: Segmentati= on fault ./c-c++-common/Wsizeof-pointer-memaccess1.c:71:1: internal compiler error: Segmentation fault ./c-c++-common/Wsizeof-pointer-memaccess2.c:176:1: internal compiler error: Segmentation fault $=20 The -ftrivial... flag although a good idea, doesn't look ready for prime time yet. I suggest it is removed and the original code reworked until it doesn't cause any "internal compiler error:" for the C testsuite.=