Bug 28434 - ICE with invalid protocol
Summary: ICE with invalid protocol
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: objc++ (show other bugs)
Version: 4.2.0
: P3 normal
Target Milestone: 4.2.0
Assignee: Not yet assigned to anyone
URL:
Keywords: error-recovery, ice-on-invalid-code, monitored
Depends on:
Blocks:
 
Reported: 2006-07-19 13:05 UTC by Volker Reichelt
Modified: 2006-07-19 19:57 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Volker Reichelt 2006-07-19 13:05:38 UTC
The following invalid testcase triggers an ICE since GCC 4.1.0
(when objective-c++ was introduced):

====================
Class<> c;
====================

bug.mm:1: error: expected identifier before '>' token
bug.mm:1: internal compiler error: tree check: expected identifier_node, have error_mark in lookup_and_install_protocols, at objc/objc-act.c:1438
Please submit a full bug report, [etc.]

Posting a patch soon.
Comment 1 patchapp@dberlin.org 2006-07-19 13:20:19 UTC
Subject: Bug number PR obj-c++/28434

A patch for this bug has been added to the patch tracker.
The mailing list url for the patch is http://gcc.gnu.org/ml/gcc-patches/2006-07/msg00813.html
Comment 2 Volker Reichelt 2006-07-19 19:56:40 UTC
Subject: Bug 28434

Author: reichelt
Date: Wed Jul 19 19:56:29 2006
New Revision: 115599

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115599
Log:
	PR obj-c++/28434
	* objc-act.c (lookup_and_install_protocols): Skip error_mark_nodes.

	* obj-c++.dg/proto-error-1.mm: New test.

Added:
    trunk/gcc/testsuite/obj-c++.dg/proto-error-1.mm
Modified:
    trunk/gcc/objc/ChangeLog
    trunk/gcc/objc/objc-act.c
    trunk/gcc/testsuite/ChangeLog

Comment 3 Volker Reichelt 2006-07-19 19:57:15 UTC
Fixed on mainline.