[Bug c/20760] New: cast to variable-length array type combined with switch statement gives segv
eabaltz at sophont dot net
gcc-bugzilla@gcc.gnu.org
Mon Apr 4 21:59:00 GMT 2005
gcc -v:
Configured with: ../gcc-3.4.3/configure --prefix=/u/ki/eabaltz/usr/i386
Thread model: posix
gcc version 3.4.3
command line:
gcc -Wall --save-temps bug.c
this works:
./a.out 1
matrix[0][]: 1.0 -2.0 -3.0
matrix[1][]: 2.0 4.0 -6.0
matrix[2][]: 3.0 6.0 9.0
matrix[0][]: 1.0 -2.0 -3.0
matrix[1][]: 2.0 4.0 -6.0
matrix[2][]: 3.0 6.0 9.0
---
this doesn't:
./a.out 2
matrix[0][]: 1.0 -2.0 -3.0
matrix[1][]: 2.0 4.0 -6.0
matrix[2][]: 3.0 6.0 9.0
Segmentation fault (core dumped)
--
Summary: cast to variable-length array type combined with switch
statement gives segv
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: eabaltz at sophont dot net
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20760
More information about the Gcc-bugs
mailing list