<< Back to previous view

[PCC-349] ccom crash with unknown struct within struct Created: 11/May/11  Updated: 11/May/11

Status: Resolved
Project: pcc
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major
Reporter: Nicolas Joly Assignee: Anders Magnusson
Resolution: Fixed Votes: 0
Environment: NetBSD petaure.lan 5.99.51 NetBSD 5.99.51 (PETAURE) #16: Sun May 8 22:56:08 CEST 2011 njoly@petaure.lan:/local/src/NetBSD/obj.amd64/sys/arch/amd64/compile/PETAURE amd64
pcc 1.1.0.DEVEL 20110510 for x86_64-unknown-netbsd5.99.51, njoly@petaure.lan

The following sample code, with an unknown struct within a struct, make ccom crash.

njoly@petaure [~]> cat foo.c
struct { char c; struct unknown u; } s;
int main() { return 0; }
njoly@petaure [~]> ls -l *.core
zsh: no matches found: *.core
njoly@petaure [~]> pcc -o /dev/null foo.c; echo $?
njoly@petaure [~]> ls -l *.core
-rw------- 1 njoly users 164200 May 11 00:27 ccom.core

njoly@petaure [~]> gcc -o /dev/null foo.c; echo $?
foo.c:1: error: field 'u' has incomplete type

Comment by Anders Magnusson [ 11/May/11 10:13 PM ]
Same fix as PCC-345.
Generated at Mon Apr 23 03:52:58 CEST 2018 using JIRA Enterprise Edition, Version: 3.13.1-#333.