public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/47199] New: [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors
@ 2011-01-07  2:06 zsojka at seznam dot cz
  2011-01-07  8:43 ` [Bug c++/47199] [4.6 Regression] " hjl.tools at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-07  2:06 UTC (permalink / raw)
  To: gcc-bugs

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

           Summary: [C++0x] ICE: expected class 'type', have 'declaration'
                    (function_decl) in
                    same_type_ignoring_top_level_qualifiers_p, at
                    cp/typeck.c:1407 with -fno-elide-constructors
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz


Created attachment 22917
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22917
reduced testcase

Compiler output:
$ gcc -std=c++0x -fno-elide-constructors pr47199.C  
pr47199.C:14:34:   in constexpr expansion of 'S<<anonymous> >::s [with int
<anonymous> = 0, S<<anonymous> > = S<0>]()'
pr47199.C:14:36:   in constexpr expansion of 'S<0>((*(const S<0>*)(&
S<0>(-0x00000000000000001))))'
pr47199.C:14:36: internal compiler error: tree check: expected class 'type',
have 'declaration' (function_decl) in
same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

May be related to PR47041, small changes to the testcase result in ICE
described there.

Tested revisions:
r168535 - crash
r165699 - code is rejected

Testcase was reduced from
libstdc++-v3/testsuite/20_util/duration/comparison_operators/constexpr.cc, it
fails with the same ICE


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

* [Bug c++/47199] [4.6 Regression] [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors
  2011-01-07  2:06 [Bug c++/47199] New: [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors zsojka at seznam dot cz
@ 2011-01-07  8:43 ` hjl.tools at gmail dot com
  2011-01-19 20:57 ` jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: hjl.tools at gmail dot com @ 2011-01-07  8:43 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011.01.07 05:40:34
                 CC|                            |jason at redhat dot com
   Target Milestone|---                         |4.6.0
            Summary|[C++0x] ICE: expected class |[4.6 Regression] [C++0x]
                   |'type', have 'declaration'  |ICE: expected class 'type',
                   |(function_decl) in          |have 'declaration'
                   |same_type_ignoring_top_leve |(function_decl) in
                   |l_qualifiers_p, at          |same_type_ignoring_top_leve
                   |cp/typeck.c:1407 with       |l_qualifiers_p, at
                   |-fno-elide-constructors     |cp/typeck.c:1407 with
                   |                            |-fno-elide-constructors
     Ever Confirmed|0                           |1

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> 2011-01-07 05:40:34 UTC ---
This is caused by revision 166167:

http://gcc.gnu.org/ml/gcc-cvs/2010-11/msg00053.html


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

* [Bug c++/47199] [4.6 Regression] [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors
  2011-01-07  2:06 [Bug c++/47199] New: [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors zsojka at seznam dot cz
  2011-01-07  8:43 ` [Bug c++/47199] [4.6 Regression] " hjl.tools at gmail dot com
@ 2011-01-19 20:57 ` jakub at gcc dot gnu.org
  2011-02-21  6:50 ` jason at gcc dot gnu.org
  2011-02-21 14:32 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-19 20:57 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
                 CC|                            |jakub at gcc dot gnu.org


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

* [Bug c++/47199] [4.6 Regression] [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors
  2011-01-07  2:06 [Bug c++/47199] New: [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors zsojka at seznam dot cz
  2011-01-07  8:43 ` [Bug c++/47199] [4.6 Regression] " hjl.tools at gmail dot com
  2011-01-19 20:57 ` jakub at gcc dot gnu.org
@ 2011-02-21  6:50 ` jason at gcc dot gnu.org
  2011-02-21 14:32 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-02-21  6:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Jason Merrill <jason at gcc dot gnu.org> 2011-02-21 05:26:01 UTC ---
Author: jason
Date: Mon Feb 21 05:25:56 2011
New Revision: 170356

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=170356
Log:
    PR c++/47199
    * semantics.c (cxx_eval_call_expression): Call
    cxx_eval_constant_expression in trivial shortcut.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor7.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/semantics.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/47199] [4.6 Regression] [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors
  2011-01-07  2:06 [Bug c++/47199] New: [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-02-21  6:50 ` jason at gcc dot gnu.org
@ 2011-02-21 14:32 ` jason at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jason at gcc dot gnu.org @ 2011-02-21 14:32 UTC (permalink / raw)
  To: gcc-bugs

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

Jason Merrill <jason at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |jason at gcc dot gnu.org
         Resolution|                            |FIXED

--- Comment #3 from Jason Merrill <jason at gcc dot gnu.org> 2011-02-21 14:26:06 UTC ---
Fixed.


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

end of thread, other threads:[~2011-02-21 14:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07  2:06 [Bug c++/47199] New: [C++0x] ICE: expected class 'type', have 'declaration' (function_decl) in same_type_ignoring_top_level_qualifiers_p, at cp/typeck.c:1407 with -fno-elide-constructors zsojka at seznam dot cz
2011-01-07  8:43 ` [Bug c++/47199] [4.6 Regression] " hjl.tools at gmail dot com
2011-01-19 20:57 ` jakub at gcc dot gnu.org
2011-02-21  6:50 ` jason at gcc dot gnu.org
2011-02-21 14:32 ` jason at gcc dot gnu.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).