public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14550] [3.4/3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
@ 2004-03-12 13:04 ` reichelt at gcc dot gnu dot org
  2004-03-12 15:18 ` bangerth at dealii dot org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-03-12 13:04 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |3.4.1


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


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

* [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates
@ 2004-03-12 13:04 reichelt at gcc dot gnu dot org
  2004-03-12 13:04 ` [Bug c++/14550] " reichelt 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 @ 2004-03-12 13:04 UTC (permalink / raw)
  To: gcc-bugs

The 3.4 branch ICEs on this valid code snippet:

=======================================
struct A
{
    A();
};

template<int> void foo()
{
    A *p=new A;
}

void bar()
{
    foo<0>();
}
=======================================

bug.cc: In function `void foo() [with int <anonymous> = 0]':
bug.cc:13:   instantiated from here
bug.cc:8: internal compiler error: in find_function_data, at function.c:315
Please submit a full bug report, [etc.]

And mainline rejects it:

bug.cc: In function `void foo() [with int <anonymous> = 0]':
bug.cc:13:   instantiated from here
bug.cc:8: error: invalid use of 'A::A' to form a pointer-to-member-function. 
Use a qualified-id.

Mark, I think this is a showstopper for 3.4.0.
If you agree, could you please adjust the target milestone?

-- 
           Summary: [3.4/3.5 regression] trouble with pointers in templates
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code, rejects-valid
          Severity: critical
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org,mark at codesourcery dot
                    com


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


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

* [Bug c++/14550] [3.4/3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
  2004-03-12 13:04 ` [Bug c++/14550] " reichelt at gcc dot gnu dot org
@ 2004-03-12 15:18 ` bangerth at dealii dot org
  2004-03-13 15:42 ` mmitchel at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: bangerth at dealii dot org @ 2004-03-12 15:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bangerth at dealii dot org  2004-03-12 15:18 -------
Confirmed. 

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
      Known to fail|                            |3.4.0
      Known to work|                            |3.2.3 3.3.3
   Last reconfirmed|0000-00-00 00:00:00         |2004-03-12 15:18:41
               date|                            |


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


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

* [Bug c++/14550] [3.4/3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
  2004-03-12 13:04 ` [Bug c++/14550] " reichelt at gcc dot gnu dot org
  2004-03-12 15:18 ` bangerth at dealii dot org
@ 2004-03-13 15:42 ` mmitchel at gcc dot gnu dot org
  2004-03-13 16:21 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-13 15:42 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-13 15:42 -------
Agreed; this is a showstopper.  I've therefore reset the target to 3.4.0.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4.1                       |3.4.0


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


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

* [Bug c++/14550] [3.4/3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2004-03-13 15:42 ` mmitchel at gcc dot gnu dot org
@ 2004-03-13 16:21 ` mmitchel at gcc dot gnu dot org
  2004-03-13 16:44 ` cvs-commit at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-13 16:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-13 16:21 -------
Working on a fix.

-- 
           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=14550


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

* [Bug c++/14550] [3.4/3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2004-03-13 16:21 ` mmitchel at gcc dot gnu dot org
@ 2004-03-13 16:44 ` cvs-commit at gcc dot gnu dot org
  2004-03-13 23:35 ` schmid at snake dot iap dot physik dot tu-darmstadt dot de
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-13 16:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-13 16:44 -------
Subject: Bug 14550

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	mmitchel@gcc.gnu.org	2004-03-13 16:44:17

Modified files:
	gcc/cp         : ChangeLog parser.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/parse: template14.C 

Log message:
	PR c++/14550
	* parser.c (cp_parser_non_integral_constant_expression): Encode
	more of the idiom that surrounded calls to this function within
	the function itself
	(cp_parser_primary_expression): Adjust accordingly.
	(cp_parser_postfix_expression): Likewise.
	(cp_parser_unary_expression): Likewise.
	(cp_parser_cast_expression): Likewise.
	(cp_parser_assignment_expression): Likewise.
	(cp_parser_expression): Likewise.
	(cp_parser_new_expression): Note that new-expressions are not
	allowed in integral constant expressions.
	(cp_parser_delete_expression): Likewise.
	
	PR c++/14550
	* g++.dg/parse/template14.C: New test.

Patches:
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.81&r2=1.3892.2.82
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.20&r2=1.157.2.21
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.141&r2=1.3389.2.142
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/template14.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=NONE&r2=1.1.2.1



-- 


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


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

* [Bug c++/14550] [3.4/3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2004-03-13 16:44 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-13 23:35 ` schmid at snake dot iap dot physik dot tu-darmstadt dot de
  2004-03-15  9:21 ` [Bug c++/14550] [3.5 " reichelt at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: schmid at snake dot iap dot physik dot tu-darmstadt dot de @ 2004-03-13 23:35 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From schmid at snake dot iap dot physik dot tu-darmstadt dot de  2004-03-13 23:35 -------
*** Bug 14525 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |schmid at snake dot iap dot
                   |                            |physik dot tu-darmstadt dot
                   |                            |de


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


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

* [Bug c++/14550] [3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2004-03-13 23:35 ` schmid at snake dot iap dot physik dot tu-darmstadt dot de
@ 2004-03-15  9:21 ` reichelt at gcc dot gnu dot org
  2004-03-15 16:16 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2004-03-15  9:21 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2004-03-15 09:21 -------
It's fixed in 3.4.0 now. This leaves us with rejects-valid in mainline.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |
      Known to fail|3.4.0                       |3.5.0
      Known to work|3.2.3 3.3.3                 |3.2.3 3.3.3 3.4.0
            Summary|[3.4/3.5 regression] trouble|[3.5 regression] trouble
                   |with pointers in templates  |with pointers in templates
   Target Milestone|3.4.0                       |3.5.0
            Version|3.4.0                       |3.5.0


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


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

* [Bug c++/14550] [3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2004-03-15  9:21 ` [Bug c++/14550] [3.5 " reichelt at gcc dot gnu dot org
@ 2004-03-15 16:16 ` cvs-commit at gcc dot gnu dot org
  2004-03-15 16:18 ` mmitchel at gcc dot gnu dot org
  2004-03-16 15:40 ` giovannibajo at libero dot it
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2004-03-15 16:16 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2004-03-15 16:16 -------
Subject: Bug 14550

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	mmitchel@gcc.gnu.org	2004-03-15 16:16:19

Modified files:
	gcc/cp         : ChangeLog parser.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/g++.dg/parse: template14.C 

Log message:
	PR c++/14550
	* parser.c (cp_parser_non_integral_constant_expression): Encode
	more of the idiom that surrounded calls to this function within
	the function itself
	(cp_parser_primary_expression): Adjust accordingly.
	(cp_parser_postfix_expression): Likewise.
	(cp_parser_unary_expression): Likewise.
	(cp_parser_cast_expression): Likewise.
	(cp_parser_assignment_expression): Likewise.
	(cp_parser_expression): Likewise.
	(cp_parser_new_expression): Note that new-expressions are not
	allowed in integral constant expressions.
	(cp_parser_delete_expression): Likewise.
	
	PR c++/14550
	* g++.dg/parse/template14.C: New test.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3996&r2=1.3997
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.181&r2=1.182
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3603&r2=1.3604
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/parse/template14.C.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug c++/14550] [3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2004-03-15 16:16 ` cvs-commit at gcc dot gnu dot org
@ 2004-03-15 16:18 ` mmitchel at gcc dot gnu dot org
  2004-03-16 15:40 ` giovannibajo at libero dot it
  9 siblings, 0 replies; 11+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2004-03-15 16:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From mmitchel at gcc dot gnu dot org  2004-03-15 16:18 -------
Fixed in GCC 3.4 and GCC 3.5.

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


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


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

* [Bug c++/14550] [3.5 regression] trouble with pointers in templates
  2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2004-03-15 16:18 ` mmitchel at gcc dot gnu dot org
@ 2004-03-16 15:40 ` giovannibajo at libero dot it
  9 siblings, 0 replies; 11+ messages in thread
From: giovannibajo at libero dot it @ 2004-03-16 15:40 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From giovannibajo at libero dot it  2004-03-16 15:40 -------
*** Bug 14604 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robert dot schweikert at
                   |                            |abaqus dot com


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


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

end of thread, other threads:[~2004-03-16 15:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-12 13:04 [Bug c++/14550] New: [3.4/3.5 regression] trouble with pointers in templates reichelt at gcc dot gnu dot org
2004-03-12 13:04 ` [Bug c++/14550] " reichelt at gcc dot gnu dot org
2004-03-12 15:18 ` bangerth at dealii dot org
2004-03-13 15:42 ` mmitchel at gcc dot gnu dot org
2004-03-13 16:21 ` mmitchel at gcc dot gnu dot org
2004-03-13 16:44 ` cvs-commit at gcc dot gnu dot org
2004-03-13 23:35 ` schmid at snake dot iap dot physik dot tu-darmstadt dot de
2004-03-15  9:21 ` [Bug c++/14550] [3.5 " reichelt at gcc dot gnu dot org
2004-03-15 16:16 ` cvs-commit at gcc dot gnu dot org
2004-03-15 16:18 ` mmitchel at gcc dot gnu dot org
2004-03-16 15:40 ` giovannibajo at libero dot it

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).