public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using
@ 2014-03-01  0:20 reichelt at gcc dot gnu.org
  2014-03-01  0:21 ` [Bug c++/60376] " reichelt at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-01  0:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 60376
           Summary: [4.9 Regression] ICE with invalid use of using
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Keywords: error-recovery, ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid testcase (compiled with "-std=c++1y") triggers
an ICE on trunk:

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

template<typename> void bar()
{
  using (A().foo);
}
====================================

bug.cc: In function 'void bar()':
bug.cc:8:9: error: expected nested-name-specifier before '(' token
   using (A().foo);
         ^
bug.cc:8:9: error: expected unqualified-id before '(' token
bug.cc:8:9: error: expected ';' before '(' token
bug.cc:8:18: internal compiler error: in type_dependent_expression_p, at
cp/pt.c:20901
   using (A().foo);
                  ^
0x6049a1 type_dependent_expression_p(tree_node*)
        ../../gcc/gcc/cp/pt.c:20900
0x72d994 finish_expr_stmt(tree_node*)
        ../../gcc/gcc/cp/semantics.c:686
0x6b4788 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9473
0x6b5559 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:9745
0x6b56c6 cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:9699
0x6c667b cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:18694
0x6c667b cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:18730
0x6cdc12 cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:22843
0x6ceab1 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:22755
0x6ceab1 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16589
0x6cee4a cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:23164
0x6cf134 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22966
0x6da4d9 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10947
0x6d8fc8 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10869
0x6da87a cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4014
0x6da87a c_parse_file()
        ../../gcc/gcc/cp/parser.c:31590
0x7f9fe3 c_common_parse_file()
        ../../gcc/gcc/c-family/c-opts.c:1060
Please submit a full bug report, [etc.]


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

* [Bug c++/60376] [4.9 Regression] ICE with invalid use of using
  2014-03-01  0:20 [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using reichelt at gcc dot gnu.org
@ 2014-03-01  0:21 ` reichelt at gcc dot gnu.org
  2014-03-02 18:30 ` [Bug c++/60376] [4.9 Regression] [c++1y] " paolo.carlini at oracle dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-01  0:21 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.8.0
   Target Milestone|---                         |4.9.0
      Known to fail|                            |4.9.0


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

* [Bug c++/60376] [4.9 Regression] [c++1y] ICE with invalid use of using
  2014-03-01  0:20 [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using reichelt at gcc dot gnu.org
  2014-03-01  0:21 ` [Bug c++/60376] " reichelt at gcc dot gnu.org
@ 2014-03-02 18:30 ` paolo.carlini at oracle dot com
  2014-03-02 21:20 ` [Bug c++/60376] [4.9 Regression] [c++1y] ICE using member function in a template function reichelt at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-02 18:30 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-03-02
           Assignee|unassigned at gcc dot gnu.org      |paolo.carlini at oracle dot com
     Ever confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Mine.


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

* [Bug c++/60376] [4.9 Regression] [c++1y] ICE using member function in a template function
  2014-03-01  0:20 [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using reichelt at gcc dot gnu.org
  2014-03-01  0:21 ` [Bug c++/60376] " reichelt at gcc dot gnu.org
  2014-03-02 18:30 ` [Bug c++/60376] [4.9 Regression] [c++1y] " paolo.carlini at oracle dot com
@ 2014-03-02 21:20 ` reichelt at gcc dot gnu.org
  2014-03-03  9:00 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-02 21:20 UTC (permalink / raw)
  To: gcc-bugs

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

Volker Reichelt <reichelt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|error-recovery              |ice-on-valid-code
            Summary|[4.9 Regression] [c++1y]    |[4.9 Regression] [c++1y]
                   |ICE with invalid use of     |ICE using member function
                   |using                       |in a template function

--- Comment #2 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
While the original testcase was invald, here's a valid one that crashes
in the same place:

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

template<typename T> void bar(T)
{
  (A().foo)();
}
====================================

bug.cc: In function 'void bar(T)':
bug.cc:8:13: internal compiler error: in type_dependent_expression_p, at
cp/pt.c:20901
   (A().foo)();
             ^
0x6049a1 type_dependent_expression_p(tree_node*)
        ../../gcc/gcc/cp/pt.c:20900
0x734ef4 finish_call_expr(tree_node*, vec<tree_node*, va_gc, vl_embed>**, bool,
bool, int)
        ../../gcc/gcc/cp/semantics.c:2199
0x6b8901 cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:6164
0x6bb493 cp_parser_unary_expression
        ../../gcc/gcc/cp/parser.c:7170
0x6bc17f cp_parser_binary_expression
        ../../gcc/gcc/cp/parser.c:7874
0x6bc661 cp_parser_assignment_expression
        ../../gcc/gcc/cp/parser.c:8112
0x6bea73 cp_parser_expression
        ../../gcc/gcc/cp/parser.c:8274
0x6bf29c cp_parser_expression
        ../../gcc/gcc/cp/parser.c:8313
0x6bf29c cp_parser_expression_statement
        ../../gcc/gcc/cp/parser.c:9622
0x6b4788 cp_parser_statement
        ../../gcc/gcc/cp/parser.c:9473
0x6b5559 cp_parser_statement_seq_opt
        ../../gcc/gcc/cp/parser.c:9745
0x6b56c6 cp_parser_compound_statement
        ../../gcc/gcc/cp/parser.c:9699
0x6c667b cp_parser_function_body
        ../../gcc/gcc/cp/parser.c:18694
0x6c667b cp_parser_ctor_initializer_opt_and_function_body
        ../../gcc/gcc/cp/parser.c:18730
0x6cdc12 cp_parser_function_definition_after_declarator
        ../../gcc/gcc/cp/parser.c:22843
0x6ceab1 cp_parser_function_definition_from_specifiers_and_declarator
        ../../gcc/gcc/cp/parser.c:22755
0x6ceab1 cp_parser_init_declarator
        ../../gcc/gcc/cp/parser.c:16589
0x6cee4a cp_parser_single_declaration
        ../../gcc/gcc/cp/parser.c:23164
0x6cf134 cp_parser_template_declaration_after_export
        ../../gcc/gcc/cp/parser.c:22966
0x6da4d9 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10947
Please submit a full bug report, [etc.]


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

* [Bug c++/60376] [4.9 Regression] [c++1y] ICE using member function in a template function
  2014-03-01  0:20 [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-03-02 21:20 ` [Bug c++/60376] [4.9 Regression] [c++1y] ICE using member function in a template function reichelt at gcc dot gnu.org
@ 2014-03-03  9:00 ` rguenth at gcc dot gnu.org
  2014-03-03  9:21 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rguenth at gcc dot gnu.org @ 2014-03-03  9:00 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1


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

* [Bug c++/60376] [4.9 Regression] [c++1y] ICE using member function in a template function
  2014-03-01  0:20 [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-03-03  9:00 ` rguenth at gcc dot gnu.org
@ 2014-03-03  9:21 ` paolo.carlini at oracle dot com
  2014-03-04 10:52 ` paolo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-03  9:21 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P1                          |P3

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Please file a separate bug report, it's a different issue.


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

* [Bug c++/60376] [4.9 Regression] [c++1y] ICE using member function in a template function
  2014-03-01  0:20 [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-03-03  9:21 ` paolo.carlini at oracle dot com
@ 2014-03-04 10:52 ` paolo at gcc dot gnu.org
  2014-03-04 10:56 ` [Bug c++/60376] [4.9 Regression] [c++1y] ICE on invalid with using declaration in " paolo.carlini at oracle dot com
  2014-03-07 20:17 ` reichelt at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-03-04 10:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Tue Mar  4 10:52:18 2014
New Revision: 208309

URL: http://gcc.gnu.org/viewcvs?rev=208309&root=gcc&view=rev
Log:
/gcc/cp
2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/60376
    * parser.c (cp_parser_using_declaration): Early return when
    cp_parser_nested_name_specifier errors out.

/gcc/testsuite
2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/60376
    * g++.dg/cpp1y/pr60376.C: New.

/libstdc++-v3
2014-03-04  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/60376
    * testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc:
    Adjust dg-error directives.

Added:
    trunk/gcc/testsuite/g++.dg/cpp1y/pr60376.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/parser.c
    trunk/gcc/testsuite/ChangeLog
    trunk/libstdc++-v3/ChangeLog
   
trunk/libstdc++-v3/testsuite/29_atomics/headers/atomic/types_std_c++0x_neg.cc


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

* [Bug c++/60376] [4.9 Regression] [c++1y] ICE on invalid with using declaration in template function
  2014-03-01  0:20 [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using reichelt at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-03-04 10:52 ` paolo at gcc dot gnu.org
@ 2014-03-04 10:56 ` paolo.carlini at oracle dot com
  2014-03-07 20:17 ` reichelt at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-03-04 10:56 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|ice-on-valid-code           |
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED
           Assignee|paolo.carlini at oracle dot com    |unassigned at gcc dot gnu.org
            Summary|[4.9 Regression] [c++1y]    |[4.9 Regression] [c++1y]
                   |ICE using member function   |ICE on invalid with using
                   |in a template function      |declaration in template
                   |                            |function

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed. I'm opening a separate Bug for Comment 2.


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

* [Bug c++/60376] [4.9 Regression] [c++1y] ICE on invalid with using declaration in template function
  2014-03-01  0:20 [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using reichelt at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2014-03-04 10:56 ` [Bug c++/60376] [4.9 Regression] [c++1y] ICE on invalid with using declaration in " paolo.carlini at oracle dot com
@ 2014-03-07 20:17 ` reichelt at gcc dot gnu.org
  7 siblings, 0 replies; 9+ messages in thread
From: reichelt at gcc dot gnu.org @ 2014-03-07 20:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Volker Reichelt <reichelt at gcc dot gnu.org> ---
Just for the record: the new bug is PR60409.


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

end of thread, other threads:[~2014-03-07 20:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-01  0:20 [Bug c++/60376] New: [4.9 Regression] ICE with invalid use of using reichelt at gcc dot gnu.org
2014-03-01  0:21 ` [Bug c++/60376] " reichelt at gcc dot gnu.org
2014-03-02 18:30 ` [Bug c++/60376] [4.9 Regression] [c++1y] " paolo.carlini at oracle dot com
2014-03-02 21:20 ` [Bug c++/60376] [4.9 Regression] [c++1y] ICE using member function in a template function reichelt at gcc dot gnu.org
2014-03-03  9:00 ` rguenth at gcc dot gnu.org
2014-03-03  9:21 ` paolo.carlini at oracle dot com
2014-03-04 10:52 ` paolo at gcc dot gnu.org
2014-03-04 10:56 ` [Bug c++/60376] [4.9 Regression] [c++1y] ICE on invalid with using declaration in " paolo.carlini at oracle dot com
2014-03-07 20:17 ` reichelt 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).