public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/27428]  New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code
@ 2006-05-04 16:25 reichelt at gcc dot gnu dot org
  2006-05-04 16:28 ` [Bug middle-end/27428] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2006-05-04 16:25 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet causes a segfault in main_block_label
in tree-cfg.c:

===========================
void foo()
{
    goto L;
    if (0..) { L: ; }
}
===========================

bug.c:4:9: error: too many decimal points in number
bug.c: In function 'foo':
bug.c:5: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

We ICE since GCC 4.0.0.


-- 
           Summary: [4.0/4.1/4.2 regression] ICE with goto in erroneous code
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, error-recovery, monitored
          Severity: normal
          Priority: P3
         Component: middle-end
        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=27428


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

* [Bug middle-end/27428] [4.0/4.1/4.2 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
@ 2006-05-04 16:28 ` pinskia at gcc dot gnu dot org
  2006-05-05  8:19 ` pinskia at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-04 16:28 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.0.4


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


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

* [Bug middle-end/27428] [4.0/4.1/4.2 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
  2006-05-04 16:28 ` [Bug middle-end/27428] " pinskia at gcc dot gnu dot org
@ 2006-05-05  8:19 ` pinskia at gcc dot gnu dot org
  2006-05-05  8:32 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-05  8:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2006-05-05 08:19 -------
In .orginal:
  goto L;
  if (<<< error >>>)
    {
      L:;
    }

In ,gimple:
foo ()
{
  void L = <<< error >>>;

  goto L;
}

We really should keep the if (error_mark_node)


Confirmed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2006-05-05 08:19:34
               date|                            |


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


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

* [Bug middle-end/27428] [4.0/4.1/4.2 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
  2006-05-04 16:28 ` [Bug middle-end/27428] " pinskia at gcc dot gnu dot org
  2006-05-05  8:19 ` pinskia at gcc dot gnu dot org
@ 2006-05-05  8:32 ` pinskia at gcc dot gnu dot org
  2006-05-29 22:21 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-05  8:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2006-05-05 08:32 -------
Comment out two lines in the gimplifier like:
Index: gimplify.c
===================================================================
--- gimplify.c  (revision 113452)
+++ gimplify.c  (working copy)
@@ -5655,8 +5655,8 @@ gimplify_expr (tree *expr_p, tree *pre_p
      stub out the statement or propagate the error back out.  */
   if (ret == GS_ERROR)
     {
-      if (is_statement)
-       *expr_p = NULL;
+     // if (is_statement)
+//     *expr_p = NULL;
       goto out;
     }

Works but I don't know if there is any fall out from that because it is going
to be some.


-- 


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


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

* [Bug middle-end/27428] [4.0/4.1/4.2 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2006-05-05  8:32 ` pinskia at gcc dot gnu dot org
@ 2006-05-29 22:21 ` pinskia at gcc dot gnu dot org
  2006-06-04 18:48 ` mmitchel at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-29 22:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2006-05-29 22:21 -------
(In reply to comment #2)
> Works but I don't know if there is any fall out from that because it is going
> to be some.
There a large number of falls out from that patch.


-- 


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


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

* [Bug middle-end/27428] [4.0/4.1/4.2 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2006-05-29 22:21 ` pinskia at gcc dot gnu dot org
@ 2006-06-04 18:48 ` mmitchel at gcc dot gnu dot org
  2006-06-29 22:05 ` sayle at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-06-04 18:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2006-06-04 18:47 -------
Why gimplify at all if an error has occurred?


-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug middle-end/27428] [4.0/4.1/4.2 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2006-06-04 18:48 ` mmitchel at gcc dot gnu dot org
@ 2006-06-29 22:05 ` sayle at gcc dot gnu dot org
  2006-06-30  1:08 ` [Bug middle-end/27428] [4.0/4.1 " pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: sayle at gcc dot gnu dot org @ 2006-06-29 22:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from sayle at gcc dot gnu dot org  2006-06-29 21:58 -------
Subject: Bug 27428

Author: sayle
Date: Thu Jun 29 21:57:23 2006
New Revision: 115080

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115080
Log:

        PR middle-end/27428
        * c-lex.c (c_lex_with_flags) <CPP_N_INVALID>: Increment errorcount
        to indicate the cpplib has issued an error message for us.

        * gcc.dg/pr27428-1.c: New test case.


Added:
    trunk/gcc/testsuite/gcc.dg/pr27428-1.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/c-lex.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/27428] [4.0/4.1 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2006-06-29 22:05 ` sayle at gcc dot gnu dot org
@ 2006-06-30  1:08 ` pinskia at gcc dot gnu dot org
  2006-07-01 16:32 ` sayle at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-06-30  1:08 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from pinskia at gcc dot gnu dot org  2006-06-30 00:08 -------
Fixed for 4.2 at least.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[4.0/4.1/4.2 regression] ICE|[4.0/4.1 regression] ICE
                   |with goto in erroneous code |with goto in erroneous code


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


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

* [Bug middle-end/27428] [4.0/4.1 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2006-06-30  1:08 ` [Bug middle-end/27428] [4.0/4.1 " pinskia at gcc dot gnu dot org
@ 2006-07-01 16:32 ` sayle at gcc dot gnu dot org
  2006-07-02 16:05 ` sayle at gcc dot gnu dot org
  2006-07-02 16:20 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: sayle at gcc dot gnu dot org @ 2006-07-01 16:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from sayle at gcc dot gnu dot org  2006-07-01 16:32 -------
Subject: Bug 27428

Author: sayle
Date: Sat Jul  1 16:32:00 2006
New Revision: 115116

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115116
Log:

        PR middle-end/27428
        * c-lex.c (c_lex_with_flags) <CPP_N_INVALID>: Increment errorcount
        to indicate the cpplib has issued an error message for us.

        * gcc.dg/pr27428-1.c: New test case.


Added:
    branches/gcc-4_1-branch/gcc/testsuite/gcc.dg/pr27428-1.c
Modified:
    branches/gcc-4_1-branch/gcc/ChangeLog
    branches/gcc-4_1-branch/gcc/c-lex.c
    branches/gcc-4_1-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/27428] [4.0/4.1 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2006-07-01 16:32 ` sayle at gcc dot gnu dot org
@ 2006-07-02 16:05 ` sayle at gcc dot gnu dot org
  2006-07-02 16:20 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: sayle at gcc dot gnu dot org @ 2006-07-02 16:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from sayle at gcc dot gnu dot org  2006-07-02 16:05 -------
Subject: Bug 27428

Author: sayle
Date: Sun Jul  2 16:05:28 2006
New Revision: 115133

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115133
Log:

        PR middle-end/27428
        * c-lex.c (c_lex_with_flags) <CPP_N_INVALID>: Increment errorcount
        to indicate the cpplib has issued an error message for us.

        * gcc.dg/pr27428-1.c: New test case.


Added:
    branches/gcc-4_0-branch/gcc/testsuite/gcc.dg/pr27428-1.c
Modified:
    branches/gcc-4_0-branch/gcc/ChangeLog
    branches/gcc-4_0-branch/gcc/c-lex.c
    branches/gcc-4_0-branch/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug middle-end/27428] [4.0/4.1 regression] ICE with goto in erroneous code
  2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2006-07-02 16:05 ` sayle at gcc dot gnu dot org
@ 2006-07-02 16:20 ` pinskia at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-07-02 16:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from pinskia at gcc dot gnu dot org  2006-07-02 16:20 -------
Fixed.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2006-07-02 16:20 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-04 16:25 [Bug middle-end/27428] New: [4.0/4.1/4.2 regression] ICE with goto in erroneous code reichelt at gcc dot gnu dot org
2006-05-04 16:28 ` [Bug middle-end/27428] " pinskia at gcc dot gnu dot org
2006-05-05  8:19 ` pinskia at gcc dot gnu dot org
2006-05-05  8:32 ` pinskia at gcc dot gnu dot org
2006-05-29 22:21 ` pinskia at gcc dot gnu dot org
2006-06-04 18:48 ` mmitchel at gcc dot gnu dot org
2006-06-29 22:05 ` sayle at gcc dot gnu dot org
2006-06-30  1:08 ` [Bug middle-end/27428] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-07-01 16:32 ` sayle at gcc dot gnu dot org
2006-07-02 16:05 ` sayle at gcc dot gnu dot org
2006-07-02 16:20 ` pinskia 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).