This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

c/4008: ICE: variable sized type and nested function



>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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]