public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/27719]  New: ICE on invalid function definition
@ 2006-05-22 13:15 reichelt at gcc dot gnu dot org
  2006-05-22 13:52 ` [Bug c/27719] " pinskia at gcc dot gnu dot org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-22 13:15 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE in the C frontend
since at least GCC 2.95.3:

==================
void foo()[] {}
==================

bug.c:1: error: declaration of 'foo' as array of voids
bug.c:1: internal compiler error: tree check: expected function_decl, have
var_decl in start_function, at c-decl.c:5933
Please submit a full bug report, [etc.]


-- 
           Summary: ICE on invalid function definition
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27719


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c/27719] ICE on invalid function definition
  2006-05-22 13:15 [Bug c/27719] New: ICE on invalid function definition reichelt at gcc dot gnu dot org
@ 2006-05-22 13:52 ` pinskia at gcc dot gnu dot org
  2007-01-15 19:52 ` aldot at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-22 13:52 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |minor


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27719


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c/27719] ICE on invalid function definition
  2006-05-22 13:15 [Bug c/27719] New: ICE on invalid function definition reichelt at gcc dot gnu dot org
  2006-05-22 13:52 ` [Bug c/27719] " pinskia at gcc dot gnu dot org
@ 2007-01-15 19:52 ` aldot at gcc dot gnu dot org
  2007-01-15 19:58 ` pinskia at gcc dot gnu dot org
  2009-02-21 13:17 ` jsm28 at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: aldot at gcc dot gnu dot org @ 2007-01-15 19:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from aldot at gcc dot gnu dot org  2007-01-15 19:52 -------
Does not seem to ICE for me on i386 with each of

$ gcc-2.95 --version
2.95.4
$ gcc-3.4 --version
gcc-3.4 (GCC) 3.4.6 (Debian 3.4.6-4)
$ gcc-4.1 --version
gcc-4.1 (GCC) 4.1.2 20061028 (prerelease) (Debian 4.1.1-19)
$ gcc-4.2.orig-HEAD --version
gcc-4.2.orig-HEAD (GCC) 4.2.0 20070102 (prerelease)

$ gcc-4.2.orig-HEAD -c -o /dev/null bug.c
bug.c:1: error: declaration of 'foo' as array of voids
bug.c:1: confused by earlier errors, bailing out


-- 

aldot at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aldot at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27719


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c/27719] ICE on invalid function definition
  2006-05-22 13:15 [Bug c/27719] New: ICE on invalid function definition reichelt at gcc dot gnu dot org
  2006-05-22 13:52 ` [Bug c/27719] " pinskia at gcc dot gnu dot org
  2007-01-15 19:52 ` aldot at gcc dot gnu dot org
@ 2007-01-15 19:58 ` pinskia at gcc dot gnu dot org
  2009-02-21 13:17 ` jsm28 at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-01-15 19:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-01-15 19:58 -------
> $ gcc-4.2.orig-HEAD -c -o /dev/null bug.c
> bug.c:1: error: declaration of 'foo' as array of voids
> bug.c:1: confused by earlier errors, bailing out

That is an ICE, just hidden by release checking.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27719


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug c/27719] ICE on invalid function definition
  2006-05-22 13:15 [Bug c/27719] New: ICE on invalid function definition reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-01-15 19:58 ` pinskia at gcc dot gnu dot org
@ 2009-02-21 13:17 ` jsm28 at gcc dot gnu dot org
  3 siblings, 0 replies; 5+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-02-21 13:17 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from jsm28 at gcc dot gnu dot org  2009-02-21 13:16 -------
Another ICE with possibly the same cause (ICEs in the same place):

int (*g(int y))[z]
{
return 0;
}

t.c:1: error: 'z' undeclared here (not in a function)
t.c:2: internal compiler error: tree check: expected function_decl, have
var_decl in start_function, at c-decl.c:6135


-- 

jsm28 at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|2006-09-03 21:39:54         |2009-02-21 13:16:57
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27719


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-02-21 13:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-22 13:15 [Bug c/27719] New: ICE on invalid function definition reichelt at gcc dot gnu dot org
2006-05-22 13:52 ` [Bug c/27719] " pinskia at gcc dot gnu dot org
2007-01-15 19:52 ` aldot at gcc dot gnu dot org
2007-01-15 19:58 ` pinskia at gcc dot gnu dot org
2009-02-21 13:17 ` jsm28 at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).