public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
@ 2007-11-10 17:23 ` reichelt at gcc dot gnu dot org
  2007-11-10 17:27 ` steven at gcc dot gnu dot org
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-11-10 17:23 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=34051


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

* [Bug c++/34051]  New: [4.3 regression] ICE in dependent_type_p with variadic templates
@ 2007-11-10 17:23 reichelt at gcc dot gnu dot org
  2007-11-10 17:23 ` [Bug c++/34051] " reichelt at gcc dot gnu dot org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2007-11-10 17:23 UTC (permalink / raw)
  To: gcc-bugs

The following (probably invalid) code snippet triggers an ICE on mainline:

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

template <typename... T> struct B : A
{
  using A::operator T;
};

B<int> b;
===========================================

bug.cc: In instantiation of 'B<int>':
bug.cc:11:   instantiated from here
bug.cc:8: internal compiler error: in dependent_type_p, at cp/pt.c:15327
Please submit a full bug report, [etc.]

Another code snippet that ICE's in the same place:

===========================================
template<typename... T> struct A
{
  int i __attribute__((aligned(__alignof(T))));
};

A<int> a;
===========================================

bug.cc: In instantiation of 'A<int>':
bug.cc:6:   instantiated from here
bug.cc:3: internal compiler error: in dependent_type_p, at cp/pt.c:15327
Please submit a full bug report, [etc.]


-- 
           Summary: [4.3 regression] ICE in dependent_type_p with variadic
                    templates
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code, 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=34051


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
  2007-11-10 17:23 ` [Bug c++/34051] " reichelt at gcc dot gnu dot org
@ 2007-11-10 17:27 ` steven at gcc dot gnu dot org
  2007-11-19  5:55 ` pinskia at gcc dot gnu dot org
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: steven at gcc dot gnu dot org @ 2007-11-10 17:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from steven at gcc dot gnu dot org  2007-11-10 17:27 -------
Why is this a regression? Previous GCC releases did not even support variadic
templates.


-- 


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
  2007-11-10 17:23 ` [Bug c++/34051] " reichelt at gcc dot gnu dot org
  2007-11-10 17:27 ` steven at gcc dot gnu dot org
@ 2007-11-19  5:55 ` pinskia at gcc dot gnu dot org
  2007-11-27  5:59 ` mmitchel at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-11-19  5:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from pinskia at gcc dot gnu dot org  2007-11-19 05:54 -------
Confirmed.  the regression is an ICE for error recovery.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |error-recovery
   Last reconfirmed|0000-00-00 00:00:00         |2007-11-19 05:54:52
               date|                            |


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2007-11-19  5:55 ` pinskia at gcc dot gnu dot org
@ 2007-11-27  5:59 ` mmitchel at gcc dot gnu dot org
  2007-12-02 20:57 ` pinskia at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-11-27  5:59 UTC (permalink / raw)
  To: gcc-bugs



-- 

mmitchel at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2007-11-27  5:59 ` mmitchel at gcc dot gnu dot org
@ 2007-12-02 20:57 ` pinskia at gcc dot gnu dot org
  2007-12-02 21:12 ` mmitchel at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-02 20:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2007-12-02 20:57 -------
 Mark, this is really only an error recovery regression. Can you relook at the
current priority?

Thanks,
Andrew Pinski


t1.cc:7: error: ISO C++ does not include variadic templates
t1.cc: In instantiation of 'B<int>':
t1.cc:12:   instantiated from here
t1.cc:9: internal compiler error: in dependent_type_p, at cp/pt.c:15363
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mmitchel at gcc dot gnu dot
                   |                            |org


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
                   ` (4 preceding siblings ...)
  2007-12-02 20:57 ` pinskia at gcc dot gnu dot org
@ 2007-12-02 21:12 ` mmitchel at gcc dot gnu dot org
  2007-12-02 21:16 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-12-02 21:12 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from mmitchel at gcc dot gnu dot org  2007-12-02 21:12 -------
What happens in C++0x mode?  The error about variadic templates not being part
of ISO C++ would presumably not occur in that mode.


-- 


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
                   ` (5 preceding siblings ...)
  2007-12-02 21:12 ` mmitchel at gcc dot gnu dot org
@ 2007-12-02 21:16 ` pinskia at gcc dot gnu dot org
  2007-12-02 21:25 ` mmitchel at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-12-02 21:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from pinskia at gcc dot gnu dot org  2007-12-02 21:15 -------
(In reply to comment #4)
> What happens in C++0x mode?  The error about variadic templates not being part
> of ISO C++ would presumably not occur in that mode.

Correct but C++0x mode was not in 4.2 so only the normal gnuC++98 mode issue of
an error recovery can be a regression.


-- 


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
                   ` (6 preceding siblings ...)
  2007-12-02 21:16 ` pinskia at gcc dot gnu dot org
@ 2007-12-02 21:25 ` mmitchel at gcc dot gnu dot org
  2007-12-20 20:57 ` dgregor at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2007-12-02 21:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from mmitchel at gcc dot gnu dot org  2007-12-02 21:25 -------
I disagree.  

If we bring out a new feature in the compiler, then that new feature should be
robust.  We do not want to tell users that one of the great new things about
GCC 4.3 is C++ 200x support, only to have them find that it tends to crash when
they make a mistake in their code.


-- 


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
                   ` (7 preceding siblings ...)
  2007-12-02 21:25 ` mmitchel at gcc dot gnu dot org
@ 2007-12-20 20:57 ` dgregor at gcc dot gnu dot org
  2008-01-12 19:42 ` andreasmeier80 at gmx dot de
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 13+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2007-12-20 20:57 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|NEW                         |ASSIGNED
   Last reconfirmed|2007-11-19 05:54:52         |2007-12-20 20:56:48
               date|                            |


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
                   ` (8 preceding siblings ...)
  2007-12-20 20:57 ` dgregor at gcc dot gnu dot org
@ 2008-01-12 19:42 ` andreasmeier80 at gmx dot de
  2008-01-15 18:10 ` dgregor at gcc dot gnu dot org
  2008-01-15 18:10 ` dgregor at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: andreasmeier80 at gmx dot de @ 2008-01-12 19:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from andreasmeier80 at gmx dot de  2008-01-12 19:09 -------
Patch at http://gcc.gnu.org/ml/gcc-patches/2007-12/msg00149.html


-- 


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
                   ` (9 preceding siblings ...)
  2008-01-12 19:42 ` andreasmeier80 at gmx dot de
@ 2008-01-15 18:10 ` dgregor at gcc dot gnu dot org
  2008-01-15 18:10 ` dgregor at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-01-15 18:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dgregor at gcc dot gnu dot org  2008-01-15 18:08 -------
Subject: Bug 34051

Author: dgregor
Date: Tue Jan 15 18:08:00 2008
New Revision: 131547

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131547
Log:
2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

        PR c++/34051
        PR c++/34055
        PR c++/34102
        PR c++/34103
        * typeck.c (check_return_expr): If there are bare parameter packs
        in the return value, set it to error_mark_node.
        * tree.c (cp_walk_subtrees): Walk USING_DECL nodes.
        * pt.c (find_parameter_packs_r): Look at the type of
        IDENTIFIER_NODEs (e.g., for user-defined conversions).
        (check_for_bare_parameter_packs): Flip the result: now returns
        TRUE when there were bare parameter packs, FALSE otherwise.
        (push_template_decl_real): Deal with flipped result of
        check_for_bare_parameter_packs.
        * semantics.c (finish_cond): If there are bare parameter packs in
        the conditional, set it to error_mark_node.
        (finish_expr_stmt): If there are bare parameter packs in the
        expression, set it to error_mark_node.
        (finish_for_expr): Ditto.
        (finish_switch_cond): If there are bare parameter packs in
        the conditional, set it to error_mark_node.
        (finish_mem_initializers): If there are bare parameter packs in
        the member initializer, set it to error_mark_node.
        (finish_member_declaration): Check the attributes of the
        declaration for bare parameter packs, and remove the attributes if
        any have bare parameter packs.
        * parser.c (cp_parser_using_declaration): Check the using
        declaration for bare parameter packs.
        (cp_parser_base_clause): If there are bare parameter packs in a
        base specifier, don't add it to the chain.

2008-01-15  Douglas Gregor  <doug.gregor@gmail.com>

        PR c++/34051
        PR c++/34055
        PR c++/34102
        PR c++/34103
        * g++.dg/cpp0x/vt-34051-2.C: New.
        * g++.dg/cpp0x/vt-34102.C: New.
        * g++.dg/cpp0x/vt-34051.C: New.
        * g++.dg/cpp0x/vt-34055.C: New.
        * g++.dg/cpp0x/vt-34103.C: New.


Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/vt-34051-2.C
    trunk/gcc/testsuite/g++.dg/cpp0x/vt-34051.C
    trunk/gcc/testsuite/g++.dg/cpp0x/vt-34055.C
    trunk/gcc/testsuite/g++.dg/cpp0x/vt-34102.C
    trunk/gcc/testsuite/g++.dg/cpp0x/vt-34103.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/cp/pt.c
    trunk/gcc/cp/semantics.c
    trunk/gcc/cp/tree.c
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/34051] [4.3 regression] ICE in dependent_type_p with variadic templates
  2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
                   ` (10 preceding siblings ...)
  2008-01-15 18:10 ` dgregor at gcc dot gnu dot org
@ 2008-01-15 18:10 ` dgregor at gcc dot gnu dot org
  11 siblings, 0 replies; 13+ messages in thread
From: dgregor at gcc dot gnu dot org @ 2008-01-15 18:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from dgregor at gcc dot gnu dot org  2008-01-15 18:08 -------
Fixed in mainline


-- 

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


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

end of thread, other threads:[~2008-01-15 18:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-10 17:23 [Bug c++/34051] New: [4.3 regression] ICE in dependent_type_p with variadic templates reichelt at gcc dot gnu dot org
2007-11-10 17:23 ` [Bug c++/34051] " reichelt at gcc dot gnu dot org
2007-11-10 17:27 ` steven at gcc dot gnu dot org
2007-11-19  5:55 ` pinskia at gcc dot gnu dot org
2007-11-27  5:59 ` mmitchel at gcc dot gnu dot org
2007-12-02 20:57 ` pinskia at gcc dot gnu dot org
2007-12-02 21:12 ` mmitchel at gcc dot gnu dot org
2007-12-02 21:16 ` pinskia at gcc dot gnu dot org
2007-12-02 21:25 ` mmitchel at gcc dot gnu dot org
2007-12-20 20:57 ` dgregor at gcc dot gnu dot org
2008-01-12 19:42 ` andreasmeier80 at gmx dot de
2008-01-15 18:10 ` dgregor at gcc dot gnu dot org
2008-01-15 18:10 ` 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).