From mboxrd@z Thu Jan 1 00:00:00 1970 From: dave.anglin@nrc.ca To: gcc-gnats@gcc.gnu.org Subject: c/4008: ICE: variable sized type and nested function Date: Sun, 12 Aug 2001 14:36:00 -0000 Message-id: <20010812213349.4638.qmail@sourceware.cygnus.com> X-SW-Source: 2001-08/msg00314.html List-Id: >Number: 4008 >Category: c >Synopsis: ICE: variable sized type and nested function >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: ice-on-legal-code >Submitter-Id: net >Arrival-Date: Sun Aug 12 14:36:00 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Dave Anglin >Release: 3.0.1 (prerealease) and 3.1 (prerelease) >Organization: >Environment: i686-pc-linux-gnu and hppa1.1-hp-hpux10.20 >Description: The testfile xxx.c causes various ICEs. It was derived from compile/20010605-1.c. Currently, compile/20010605-1.c fails on the PA. Since there is a problem with the return of a variable sized type in a nested function, I wondered if there would also be with a variable sized parameter in a nested function. With gcc-3.0.1 on the PA: 266 (hiauly1)dave> gcc -o xxx xxx.c xxx.c: In function `block_parm': xxx.c:13: Internal compiler error in size_binop, at fold-const.c:1914 On the PA, there is a problem with pa.h not doing appropriate checks after calling int_size_in_bytes for a return of -1. However, even with this fixed, the test code still causes an ICE. Part of the problem is assign_parms is called before the static chain list is built. >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: application/octet-stream; name="xxx.c" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="xxx.c" aW50Cm1haW4gKGludCBhcmdjLCBjaGFyICoqYXJndikKewogIGNvbnN0IGludCBzaXplID0gMTA7 CgogIHR5cGVkZWYgc3RydWN0IHsKICAgIGNoYXIgdmFsW3NpemVdOwogIH0gYmxvY2s7CgogIGlu dCBibG9ja19wYXJtIChibG9jayBiKQogICAgewogICAgICByZXR1cm4gc2l6ZW9mIChiKTsKICAg IH0KCiAgYmxvY2sgYTsKCiAgaWYgKGJsb2NrX3Bhcm0gKGEpICE9IHNpemUpCiAgICBhYm9ydCAo KTsKCiAgZXhpdCAoMCk7Cn0K