public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33838]  New: [4.3 regresssion] ICE with invalid use of decltype
@ 2007-10-20 21:45 reichelt at gcc dot gnu dot org
  2007-10-20 21:45 ` [Bug c++/33838] " reichelt at gcc dot gnu dot org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-10-20 21:45 UTC (permalink / raw)
  To: gcc-bugs

The following invalid code snippet triggers an ICE on mainline:

===============================
template<typename T> struct A
{
  __decltype (T* foo());
};
===============================

bug.cc:3: error: expected primary-expression before '*' token
bug.cc:3: error: there are no arguments to 'foo' that depend on a template
parameter, so a declaration of 'foo' must be available
bug.cc:3: error: (if you use '-fpermissive', G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
bug.cc:3: internal compiler error: Segmentation fault
Please submit a full bug report, [etc.]

The problem appeared between 2007-07-16 and 2007-08-15, presumably with
the introduction of decltype:

2007-07-27  Douglas Gregor  <doug.gregor@gmail.com>

        * typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
        * cp-tree.def (DECLTYPE_TYPE): New.
        * error.c (dump_type): Dump DECLTYPE_TYPE nodes.
        ...


-- 
           Summary: [4.3 regresssion] ICE with invalid use of decltype
           Product: gcc
           Version: 4.3.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=33838


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

* [Bug c++/33838] [4.3 regresssion] ICE with invalid use of decltype
  2007-10-20 21:45 [Bug c++/33838] New: [4.3 regresssion] ICE with invalid use of decltype reichelt at gcc dot gnu dot org
@ 2007-10-20 21:45 ` reichelt at gcc dot gnu dot org
  2007-10-26 18:38 ` dgregor at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-10-20 21:45 UTC (permalink / raw)
  To: gcc-bugs



-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.3.0


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


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

* [Bug c++/33838] [4.3 regresssion] ICE with invalid use of decltype
  2007-10-20 21:45 [Bug c++/33838] New: [4.3 regresssion] ICE with invalid use of decltype reichelt at gcc dot gnu dot org
  2007-10-20 21:45 ` [Bug c++/33838] " reichelt at gcc dot gnu dot org
@ 2007-10-26 18:38 ` dgregor at gcc dot gnu dot org
  2007-10-28 21:19 ` reichelt at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-10-26 18:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dgregor at gcc dot gnu dot org  2007-10-26 18:38 -------
Same problem as in 33839; fixed by that patch.

*** This bug has been marked as a duplicate of 33839 ***


-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug c++/33838] [4.3 regresssion] ICE with invalid use of decltype
  2007-10-20 21:45 [Bug c++/33838] New: [4.3 regresssion] ICE with invalid use of decltype reichelt at gcc dot gnu dot org
  2007-10-20 21:45 ` [Bug c++/33838] " reichelt at gcc dot gnu dot org
  2007-10-26 18:38 ` dgregor at gcc dot gnu dot org
@ 2007-10-28 21:19 ` reichelt at gcc dot gnu dot org
  2007-11-05  1:49 ` mmitchel at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-10-28 21:19 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from reichelt at gcc dot gnu dot org  2007-10-28 21:19 -------
While PR33839 and PR33837 got fixed, this ICE still persists.


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |UNCONFIRMED
         Resolution|DUPLICATE                   |


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


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

* [Bug c++/33838] [4.3 regresssion] ICE with invalid use of decltype
  2007-10-20 21:45 [Bug c++/33838] New: [4.3 regresssion] ICE with invalid use of decltype reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-10-28 21:19 ` reichelt at gcc dot gnu dot org
@ 2007-11-05  1:49 ` mmitchel at gcc dot gnu dot org
  2007-11-05 20:32 ` dgregor at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-11-05  1:49 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P4


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


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

* [Bug c++/33838] [4.3 regresssion] ICE with invalid use of decltype
  2007-10-20 21:45 [Bug c++/33838] New: [4.3 regresssion] ICE with invalid use of decltype reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-11-05  1:49 ` mmitchel at gcc dot gnu dot org
@ 2007-11-05 20:32 ` dgregor at gcc dot gnu dot org
  2007-11-07 23:38 ` dgregor at gcc dot gnu dot org
  2007-11-07 23:40 ` dgregor at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-11-05 20:32 UTC (permalink / raw)
  To: gcc-bugs



-- 

dgregor at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |dgregor at gcc dot gnu dot
                   |dot org                     |org
             Status|UNCONFIRMED                 |ASSIGNED
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-11-05 20:32:52
               date|                            |


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


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

* [Bug c++/33838] [4.3 regresssion] ICE with invalid use of decltype
  2007-10-20 21:45 [Bug c++/33838] New: [4.3 regresssion] ICE with invalid use of decltype reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-11-05 20:32 ` dgregor at gcc dot gnu dot org
@ 2007-11-07 23:38 ` dgregor at gcc dot gnu dot org
  2007-11-07 23:40 ` dgregor at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-11-07 23:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dgregor at gcc dot gnu dot org  2007-11-07 23:37 -------
Subject: Bug 33838

Author: dgregor
Date: Wed Nov  7 23:37:29 2007
New Revision: 129975

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=129975
Log:
2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>

        PR c++/33045
        PR c++/33837
        PR c++/33838
        * semantics.c (finish_decltype_type): See through INDIRECT_REFs.
        Be careful with ERROR_MARK_NODEs.
        * parser.c (cp_parser_check_access_in_redeclaration): Handle NULL
        argument.

2007-11-07  Douglas Gregor  <doug.gregor@gmail.com>

        PR c++/33045
        PR c++/33837
        PR c++/33838
        * g++.dg/cpp0x/decltype-33837.C: New.
        * g++.dg/cpp0x/decltype-refbug.C: New.
        * g++.dg/cpp0x/decltype-33838.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype-33837.C
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype-refbug.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/33838] [4.3 regresssion] ICE with invalid use of decltype
  2007-10-20 21:45 [Bug c++/33838] New: [4.3 regresssion] ICE with invalid use of decltype reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-11-07 23:38 ` dgregor at gcc dot gnu dot org
@ 2007-11-07 23:40 ` dgregor at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-11-07 23:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dgregor at gcc dot gnu dot org  2007-11-07 23:40 -------
Fixed


-- 

dgregor at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2007-11-07 23:40 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-20 21:45 [Bug c++/33838] New: [4.3 regresssion] ICE with invalid use of decltype reichelt at gcc dot gnu dot org
2007-10-20 21:45 ` [Bug c++/33838] " reichelt at gcc dot gnu dot org
2007-10-26 18:38 ` dgregor at gcc dot gnu dot org
2007-10-28 21:19 ` reichelt at gcc dot gnu dot org
2007-11-05  1:49 ` mmitchel at gcc dot gnu dot org
2007-11-05 20:32 ` dgregor at gcc dot gnu dot org
2007-11-07 23:38 ` dgregor at gcc dot gnu dot org
2007-11-07 23:40 ` dgregor 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).