public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/19739] New: ICE with additional comma in attribute
@ 2005-02-01  9:00 micis at gmx dot de
  2005-02-01 12:52 ` [Bug c++/19739] " pinskia at gcc dot gnu dot org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: micis at gmx dot de @ 2005-02-01  9:00 UTC (permalink / raw)
  To: gcc-bugs

In a function attribute I had comma more than needed and I got an ICE. Below is 
a small program to demonstrate this:

Michael Cieslinski


void Dummy() __attribute__(( , ));
void Dummy() {}

int main (int argc, char **argv)
{
    Dummy();
    return 0;
}


when compiled it results in an ICE:

g++  -c -o bug.o bug.cpp 
../../../Portabel/MetisIP/link/bug.cpp:2: error: expected `)' before ',' token
../../../Portabel/MetisIP/link/bug.cpp:2: error: expected `)' before ',' token
../../../Portabel/MetisIP/link/bug.cpp:2: internal compiler error: tree check: 
expected tree_list, have error_mark in lookup_attribute, at tree.c:3080
Please submit a full bug report, with preprocessed source if appropriate.


g++ -v
Using built-in specs.
Configured with: ../gcc40/configure --prefix=/usr/local/gcc40c --program-
suffix=40c --with-arch=opteron --enable-languages=c,c++ --enable-checking
Thread model: posix
gcc version 4.0.0 20050130 (experimental)

-- 
           Summary: ICE with additional comma in attribute
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: micis at gmx dot de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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


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

* [Bug c++/19739] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
@ 2005-02-01 12:52 ` pinskia at gcc dot gnu dot org
  2005-02-01 13:25 ` [Bug c++/19739] [3.4/4.0 Regression] " 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 @ 2005-02-01 12:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-01 12:52 -------
Hmm, we used to accept this before 3.4.0 and we still do in the C front-end.

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


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


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

* [Bug c++/19739] [3.4/4.0 Regression] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
  2005-02-01 12:52 ` [Bug c++/19739] " pinskia at gcc dot gnu dot org
@ 2005-02-01 13:25 ` pinskia at gcc dot gnu dot org
  2005-02-01 13:49 ` joseph at codesourcery dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-01 13:25 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-01 13:25 -------
This a regression no matter if this is valid or invalid code, an ICE from compiling/not compiling is a 
regression.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-01 13:25:34
               date|                            |
            Summary|ICE with additional comma in|[3.4/4.0 Regression] ICE
                   |attribute                   |with additional comma in
                   |                            |attribute
   Target Milestone|---                         |3.4.4


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


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

* [Bug c++/19739] [3.4/4.0 Regression] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
  2005-02-01 12:52 ` [Bug c++/19739] " pinskia at gcc dot gnu dot org
  2005-02-01 13:25 ` [Bug c++/19739] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
@ 2005-02-01 13:49 ` joseph at codesourcery dot com
  2005-02-01 17:47 ` pinskia at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: joseph at codesourcery dot com @ 2005-02-01 13:49 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From joseph at codesourcery dot com  2005-02-01 13:49 -------
Subject: Re:  ICE with additional comma in attribute

On Tue, 1 Feb 2005, pinskia at gcc dot gnu dot org wrote:

> Hmm, we used to accept this before 3.4.0 and we still do in the C front-end.

This is valid code (according to the documentation I wrote, "Attribute 
Syntax" in the manual): attributes may be empty.



-- 


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


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

* [Bug c++/19739] [3.4/4.0 Regression] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
                   ` (2 preceding siblings ...)
  2005-02-01 13:49 ` joseph at codesourcery dot com
@ 2005-02-01 17:47 ` pinskia at gcc dot gnu dot org
  2005-02-09 13:52 ` 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 @ 2005-02-01 17:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-01 17:46 -------
: Search converges between 2002-12-14-trunk (#159) and 2002-12-29-trunk (#160).
This is caused by the new parser as JSM said this is valid.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org
           Keywords|                            |ice-on-valid-code


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


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

* [Bug c++/19739] [3.4/4.0 Regression] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
                   ` (3 preceding siblings ...)
  2005-02-01 17:47 ` pinskia at gcc dot gnu dot org
@ 2005-02-09 13:52 ` mmitchel at gcc dot gnu dot org
  2005-02-09 17:20 ` steven 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 @ 2005-02-09 13:52 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |mark at codesourcery dot com
                   |dot org                     |
             Status|NEW                         |ASSIGNED


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


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

* [Bug c++/19739] [3.4/4.0 Regression] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
                   ` (4 preceding siblings ...)
  2005-02-09 13:52 ` mmitchel at gcc dot gnu dot org
@ 2005-02-09 17:20 ` steven at gcc dot gnu dot org
  2005-02-10  8:00 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: steven at gcc dot gnu dot org @ 2005-02-09 17:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From steven at gcc dot gnu dot org  2005-02-09 10:23 -------
(From update of attachment 8151)
Except that it is an ICE on _valid_, not invalid.  Bogus patch.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
Attachment #8151 is|0                           |1
           obsolete|                            |


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


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

* [Bug c++/19739] [3.4/4.0 Regression] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
                   ` (5 preceding siblings ...)
  2005-02-09 17:20 ` steven at gcc dot gnu dot org
@ 2005-02-10  8:00 ` cvs-commit at gcc dot gnu dot org
  2005-02-10  8:52 ` [Bug c++/19739] [3.4] " mmitchel at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-10  8:00 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-10 00:35 -------
Subject: Bug 19739

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2005-02-10 00:34:47

Modified files:
	gcc/cp         : ChangeLog call.c decl.c parser.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/template: crash2.C 
Added files:
	gcc/testsuite/g++.dg/conversion: ambig1.C 
	gcc/testsuite/g++.dg/ext: attrib19.C 
	gcc/testsuite/g++.dg/parse: dtor5.C 
	gcc/testsuite/g++.dg/template: dtor3.C static11.C 

Log message:
	PR c++/19787
	* call.c (initialize_reference): Robustify.
	
	PR ++/19732
	* decl.c (grokdeclarator): Check for invalid use of destructor
	names.
	
	PR c++/19762
	* parser.c (cp_parser_unqualified_id): Avoid creating destructor
	names with invalid types.
	
	PR c++/19826
	* parser.c (cp_parser_direct_declarator): Allow type-dependent
	expressions as array bounds.
	
	PR c++/19739
	* parser.c (cp_parser_attributes_list): Allow empty lists.
	
	PR c++/19787
	* g++.dg/conversion/ambig1.C: New test.
	
	PR c++/19739
	* g++.dg/ext/attrib19.C: New test.
	
	PR c++/19732
	* g++.dg/parse/dtor5.C: New test.
	
	PR c++/19762
	* g++.dg/template/dtor3.C: New test.
	
	PR c++/19826
	* g++.dg/template/static11.C: New test.
	* g++.dg/template/crash2.C: Remove dg-error marker.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4618&r2=1.4619
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.528&r2=1.529
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/decl.c.diff?cvsroot=gcc&r1=1.1360&r2=1.1361
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.313&r2=1.314
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5011&r2=1.5012
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/conversion/ambig1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attrib19.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/dtor5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/dtor3.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static11.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/crash2.C.diff?cvsroot=gcc&r1=1.3&r2=1.4



-- 


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


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

* [Bug c++/19739] [3.4] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
                   ` (6 preceding siblings ...)
  2005-02-10  8:00 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-10  8:52 ` mmitchel at gcc dot gnu dot org
  2005-02-10 10:20 ` [Bug c++/19739] [3.4 Regression] " mmitchel at gcc dot gnu dot org
  2005-02-10 10:33 ` cvs-commit at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-10  8:52 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-02-10 00:42 -------
Fixed in 4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.4/4.0 Regression] ICE    |[3.4] ICE with additional
                   |with additional comma in    |comma in attribute
                   |attribute                   |


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


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

* [Bug c++/19739] [3.4 Regression] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
                   ` (7 preceding siblings ...)
  2005-02-10  8:52 ` [Bug c++/19739] [3.4] " mmitchel at gcc dot gnu dot org
@ 2005-02-10 10:20 ` mmitchel at gcc dot gnu dot org
  2005-02-10 10:33 ` cvs-commit at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-02-10 10:20 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2005-02-10 01:13 -------
Fixed in GCC 3.4.4.

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


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


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

* [Bug c++/19739] [3.4 Regression] ICE with additional comma in attribute
  2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
                   ` (8 preceding siblings ...)
  2005-02-10 10:20 ` [Bug c++/19739] [3.4 Regression] " mmitchel at gcc dot gnu dot org
@ 2005-02-10 10:33 ` cvs-commit at gcc dot gnu dot org
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-10 10:33 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-10 01:12 -------
Subject: Bug 19739

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2005-02-10 01:10:16

Modified files:
	gcc/testsuite  : ChangeLog 
	gcc/cp         : ChangeLog call.c parser.c 
Added files:
	gcc/testsuite/g++.dg/conversion: ambig1.C 
	gcc/testsuite/g++.dg/ext: attrib19.C 
	gcc/testsuite/g++.dg/template: dtor3.C 

Log message:
	PR c++/19787
	* call.c (initialize_reference): Robustify.
	
	PR c++/19762
	* parser.c (cp_parser_unqualified_id): Avoid creating destructor
	names with invalid types.
	
	PR c++/19739
	* parser.c (cp_parser_attributes_list): Allow empty lists.
	
	PR c++/19787
	* g++.dg/conversion/ambig1.C: New test.
	
	PR c++/19739
	* g++.dg/ext/attrib19.C: New test.
	
	PR c++/19762
	* g++.dg/template/dtor3.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.357&r2=1.3389.2.358
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/conversion/ambig1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/attrib19.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/dtor3.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.195&r2=1.3892.2.196
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.22&r2=1.452.2.23
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.157.2.51&r2=1.157.2.52



-- 


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


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

end of thread, other threads:[~2005-02-10  1:13 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-01  9:00 [Bug c++/19739] New: ICE with additional comma in attribute micis at gmx dot de
2005-02-01 12:52 ` [Bug c++/19739] " pinskia at gcc dot gnu dot org
2005-02-01 13:25 ` [Bug c++/19739] [3.4/4.0 Regression] " pinskia at gcc dot gnu dot org
2005-02-01 13:49 ` joseph at codesourcery dot com
2005-02-01 17:47 ` pinskia at gcc dot gnu dot org
2005-02-09 13:52 ` mmitchel at gcc dot gnu dot org
2005-02-09 17:20 ` steven at gcc dot gnu dot org
2005-02-10  8:00 ` cvs-commit at gcc dot gnu dot org
2005-02-10  8:52 ` [Bug c++/19739] [3.4] " mmitchel at gcc dot gnu dot org
2005-02-10 10:20 ` [Bug c++/19739] [3.4 Regression] " mmitchel at gcc dot gnu dot org
2005-02-10 10:33 ` cvs-commit 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).