public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/102285] New: New flag -ftrivial-auto-var-init=zero causes many crashes in the testsuite
@ 2021-09-10 21:50 dcb314 at hotmail dot com
  2021-09-10 22:11 ` [Bug middle-end/102285] " qinzhao at gcc dot gnu.org
                   ` (30 more replies)
  0 siblings, 31 replies; 32+ messages in thread
From: dcb314 at hotmail dot com @ 2021-09-10 21:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 102285
           Summary: New flag -ftrivial-auto-var-init=zero 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=zero  $i; done > 11.out 2>&1 
$

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 files.

$ grep -c "\.c$" 11.out 
9184
$ 

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 fault
./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: Segmentation
fault
./c-c++-common/Warray-bounds-9.c:12:12: internal compiler error: Segmentation
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
$ 

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.

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2021-10-05  8:47 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 21:50 [Bug c/102285] New: New flag -ftrivial-auto-var-init=zero causes many crashes in the testsuite dcb314 at hotmail dot com
2021-09-10 22:11 ` [Bug middle-end/102285] " qinzhao at gcc dot gnu.org
2021-09-10 22:28 ` qinzhao at gcc dot gnu.org
2021-09-10 22:34 ` pinskia at gcc dot gnu.org
2021-09-10 23:10 ` qing.zhao at oracle dot com
2021-09-12  3:33 ` qinzhao at gcc dot gnu.org
2021-09-12  8:06 ` dcb314 at hotmail dot com
2021-09-13 10:25 ` rguenth at gcc dot gnu.org
2021-09-13 17:30 ` qinzhao at gcc dot gnu.org
2021-09-29 22:44 ` [Bug middle-end/102285] New flag -ftrivial-auto-var-init=zero causes crash in pr82421.c qinzhao at gcc dot gnu.org
2021-09-30 19:30 ` qinzhao at gcc dot gnu.org
2021-09-30 20:22 ` qinzhao at gcc dot gnu.org
2021-09-30 20:53 ` dcb314 at hotmail dot com
2021-09-30 22:09 ` qinzhao at gcc dot gnu.org
2021-10-01  6:51 ` rguenth at gcc dot gnu.org
2021-10-01  9:45 ` egallager at gcc dot gnu.org
2021-10-01 16:16 ` qinzhao at gcc dot gnu.org
2021-10-01 16:43 ` qing.zhao at oracle dot com
2021-10-01 20:09 ` qinzhao at gcc dot gnu.org
2021-10-01 20:23 ` qinzhao at gcc dot gnu.org
2021-10-04  6:27 ` rguenther at suse dot de
2021-10-04  6:29 ` rguenther at suse dot de
2021-10-04  9:10 ` rguenth at gcc dot gnu.org
2021-10-04  9:30 ` rguenth at gcc dot gnu.org
2021-10-04 11:53 ` rguenth at gcc dot gnu.org
2021-10-04 14:54 ` rguenth at gcc dot gnu.org
2021-10-04 17:16 ` qinzhao at gcc dot gnu.org
2021-10-04 20:34 ` qinzhao at gcc dot gnu.org
2021-10-04 20:59 ` qinzhao at gcc dot gnu.org
2021-10-04 21:44 ` qinzhao at gcc dot gnu.org
2021-10-05  8:36 ` cvs-commit at gcc dot gnu.org
2021-10-05  8:47 ` rguenth at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).