[PR42538] ICE on illegal-code: tree check: expected function_decl, have var_decl in start_function

Bug #477552 reported by vlad59134
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc
Invalid
Medium
gcc-4.4 (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Binary package hint: gcc-4.4

hello

ProblemType: Crash
Architecture: i386
CheckboxSubmission: 53cc181c3490659de29f0047ca19d944
CheckboxSystem: c541d13ea4f205f2fd751f76ed21105b
Date: Sat Nov 7 17:12:16 2009
DistroRelease: Ubuntu 9.10
ExecutablePath: /usr/lib/gcc/i486-linux-gnu/4.4.1/cc1
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release i386 (20091028.5)
Package: cpp-4.4 4.4.1-4ubuntu8
ProcVersionSignature: Ubuntu 2.6.31-14.48-generic
SourcePackage: gcc-4.4
Uname: Linux 2.6.31-14-generic i686

Revision history for this message
vlad59134 (vladwozny) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

error in your program (but gcc shouldn't crash):

$ gcc main.i
/home/vladimir/Documents/Sondage/main.c:12: error: declaration of 'Saisie' as array of voids
/home/vladimir/Documents/Sondage/main.c:12: error: return type is an incomplete type
/home/vladimir/Documents/Sondage/main.c: In function 'Saisie':
/home/vladimir/Documents/Sondage/main.c:12: error: expected declaration specifiers before ')' token
/home/vladimir/Documents/Sondage/main.c:31: error: expected declaration specifiers before 'main'

Changed in gcc-4.4 (Ubuntu):
importance: Undecided → Low
status: New → Triaged
Revision history for this message
In , Debian GCC maintainers (debian-gcc) wrote :

seen on 4.2, 4.3, 4.4, 4.5 (not checked earlier versions):

$ gzip -9v ~/main.i
$ gcc-4.4 main.i
/home/vladimir/Documents/Sondage/main.c:12: error: declaration of 'Saisie' as array of voids
/home/vladimir/Documents/Sondage/main.c:12: error: return type is an incomplete type
/home/vladimir/Documents/Sondage/main.c: In function 'Saisie':
/home/vladimir/Documents/Sondage/main.c:12: error: expected declaration specifiers before ')' token
/home/vladimir/Documents/Sondage/main.c:31: error: expected declaration specifiers before 'main'
/home/vladimir/Documents/Sondage/main.c:34: confused by earlier errors, bailing out
Preprocessed source stored into /tmp/ccOvpYVY.out file, please attach this to your bugreport.

$ /usr/lib/gcc-snapshot/bin/gcc main.i
/home/vladimir/Documents/Sondage/main.c:12:6: error: declaration of 'Saisie' as array of voids
/home/vladimir/Documents/Sondage/main.c:12:1: internal compiler error: tree check: expected function_decl, have var_decl in start_function, at c-decl.c:7369
Please submit a full bug report,
with preprocessed source if appropriate.

Revision history for this message
In , Debian GCC maintainers (debian-gcc) wrote :

Created attachment 19414
preprocessed source

Matthias Klose (doko)
summary: - Code::blocks show this window but is still functionnal
+ [PR42538] ICE on illegal-code: tree check: expected function_decl, have
+ var_decl in start_function
Changed in gcc:
status: Unknown → New
Revision history for this message
In , Hjl-tools (hjl-tools) wrote :

A simple testcase:

[hjl@gnu-26 rrs]$ cat pr42538.i
void Saisie()[3]{
}
[hjl@gnu-26 rrs]$ ./143523/usr/bin/gcc -S pr42538.i
pr42538.i:1: error: declaration of ‘Saisie’ as array of voids
pr42538.i:1: internal compiler error: tree check: expected function_decl, have var_decl in start_function, at c-decl.c:6113
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
[hjl@gnu-26 rrs]$

Changed in gcc:
status: New → Confirmed
Revision history for this message
In , Pinskia (pinskia) wrote :

This is a dup of bug 27719.

*** This bug has been marked as a duplicate of bug 27719 ***

Changed in gcc:
importance: Unknown → Medium
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.