public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/59270] New: [4.9 Regression] [c++11] ICE with decltype of a broken class
@ 2013-11-23 23:26 reichelt at gcc dot gnu.org
  2013-11-25  9:16 ` [Bug c++/59270] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: reichelt at gcc dot gnu.org @ 2013-11-23 23:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 59270
           Summary: [4.9 Regression] [c++11] ICE with decltype of a broken
                    class
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: reichelt at gcc dot gnu.org

The following invalid code snippet (compiled with "-std=c++11") triggers an ICE
on trunk:

====================
struct A
{
  struct B b;
};

decltype(A()) a;
====================

bug.cc:3:12: error: field 'b' has incomplete type 'B'
   struct B b;
            ^
bug.cc:6:12: internal compiler error: tree check: expected class 'type', have
'exceptional' (error_mark) in type_build_ctor_call, at cp/class.c:5163
 decltype(A()) a;
            ^
0xd5dc85 tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        ../../gcc/gcc/tree.c:9243
0x614ed6 tree_class_check
        ../../gcc/gcc/tree.h:2831
0x614ed6 type_build_ctor_call(tree_node*)
        ../../gcc/gcc/cp/class.c:5163
0x6bcdb7 build_value_init(tree_node*, int)
        ../../gcc/gcc/cp/init.c:339
0x6bc9ef build_value_init_noctor(tree_node*, int)
        ../../gcc/gcc/cp/init.c:412
0x6bce4c build_value_init(tree_node*, int)
        ../../gcc/gcc/cp/init.c:364
0x606e6b build_functional_cast(tree_node*, tree_node*, int)
        ../../gcc/gcc/cp/typeck2.c:1858
0x66c0b5 cp_parser_functional_cast
        ../../gcc/gcc/cp/parser.c:23013
0x666930 cp_parser_postfix_expression
        ../../gcc/gcc/cp/parser.c:5821
0x6675ec cp_parser_decltype_expr
        ../../gcc/gcc/cp/parser.c:11833
0x6675ec cp_parser_decltype
        ../../gcc/gcc/cp/parser.c:11932
0x67eb57 cp_parser_simple_type_specifier
        ../../gcc/gcc/cp/parser.c:14462
0x65f29d cp_parser_type_specifier
        ../../gcc/gcc/cp/parser.c:14309
0x67634f cp_parser_decl_specifier_seq
        ../../gcc/gcc/cp/parser.c:11476
0x67ce69 cp_parser_simple_declaration
        ../../gcc/gcc/cp/parser.c:11066
0x660e03 cp_parser_block_declaration
        ../../gcc/gcc/cp/parser.c:11015
0x6875a6 cp_parser_declaration
        ../../gcc/gcc/cp/parser.c:10912
0x686298 cp_parser_declaration_seq_opt
        ../../gcc/gcc/cp/parser.c:10798
0x687b6a cp_parser_translation_unit
        ../../gcc/gcc/cp/parser.c:4018
0x687b6a c_parse_file()
        ../../gcc/gcc/cp/parser.c:31259
Please submit a full bug report, [etc.]


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

* [Bug c++/59270] [4.9 Regression] [c++11] ICE with decltype of a broken class
  2013-11-23 23:26 [Bug c++/59270] New: [4.9 Regression] [c++11] ICE with decltype of a broken class reichelt at gcc dot gnu.org
@ 2013-11-25  9:16 ` rguenth at gcc dot gnu.org
  2014-01-15 10:52 ` paolo.carlini at oracle dot com
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2013-11-25  9:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P5
   Target Milestone|---                         |4.9.0


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

* [Bug c++/59270] [4.9 Regression] [c++11] ICE with decltype of a broken class
  2013-11-23 23:26 [Bug c++/59270] New: [4.9 Regression] [c++11] ICE with decltype of a broken class reichelt at gcc dot gnu.org
  2013-11-25  9:16 ` [Bug c++/59270] " rguenth at gcc dot gnu.org
@ 2014-01-15 10:52 ` paolo.carlini at oracle dot com
  2014-01-15 10:58 ` ktkachov at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-15 10:52 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2014-01-15
           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] 8+ messages in thread

* [Bug c++/59270] [4.9 Regression] [c++11] ICE with decltype of a broken class
  2013-11-23 23:26 [Bug c++/59270] New: [4.9 Regression] [c++11] ICE with decltype of a broken class reichelt at gcc dot gnu.org
  2013-11-25  9:16 ` [Bug c++/59270] " rguenth at gcc dot gnu.org
  2014-01-15 10:52 ` paolo.carlini at oracle dot com
@ 2014-01-15 10:58 ` ktkachov at gcc dot gnu.org
  2014-01-15 11:00 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-01-15 10:58 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktkachov at gcc dot gnu.org

--- Comment #2 from ktkachov at gcc dot gnu.org ---
I'm seeing a similar ICE when testing cilk plus on arm:

$TOP/gcc/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch2.c:19:25:
internal compiler error: tree check: expected class 'type', have 'exceptional'
(error_mark) in create_tmp_from_val, at gimplify.c:456
0xbea6bd tree_class_check_failed(tree_node const*, tree_code_class, char
const*, int, char const*)
        $TOP/gcc/gcc/tree.c:9243
0x822ca6 tree_class_check
        $TOP/gcc/gcc/tree.h:2832
0x822ca6 create_tmp_from_val
        $TOP/gcc/gcc/gimplify.c:456
0x822ca6 lookup_tmp_var
        $TOP/gcc/gcc/gimplify.c:493
0x822ca6 internal_get_tmp_var
        $TOP/gcc/gcc/gimplify.c:523
0x82369e gimplify_save_expr
        $TOP/gcc/gcc/gimplify.c:4710
0x810bb7 gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
        $TOP/gcc/gcc/gimplify.c:7720
0x816fd8 gimplify_stmt(tree_node**, gimple_statement_base**)
        $TOP/gcc/gcc/gimplify.c:5334
0x817de3 gimplify_compound_expr
        $TOP/gcc/gcc/gimplify.c:4665
0x8101fb gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
        $TOP/gcc/gcc/gimplify.c:7430
0x816fd8 gimplify_stmt(tree_node**, gimple_statement_base**)
        $TOP/gcc/gcc/gimplify.c:5334
0x810243 gimplify_statement_list
        $TOP/gcc/gcc/gimplify.c:1405
0x810243 gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
        $TOP/gcc/gcc/gimplify.c:7849
0x816fd8 gimplify_stmt(tree_node**, gimple_statement_base**)
        $TOP/gcc/gcc/gimplify.c:5334
0x8181d3 gimplify_bind_expr
        $TOP/gcc/gcc/gimplify.c:1072
0x8106cd gimplify_expr(tree_node**, gimple_statement_base**,
gimple_statement_base**, bool (*)(tree_node*), int)
        $TOP/gcc/gcc/gimplify.c:7631
0x816fd8 gimplify_stmt(tree_node**, gimple_statement_base**)
        $TOP/gcc/gcc/gimplify.c:5334
0x81712a gimplify_body(tree_node*, bool)
        $TOP/gcc/gcc/gimplify.c:8541
0x817771 gimplify_function_tree(tree_node*)
        $TOP/gcc/gcc/gimplify.c:8694
0x6a8797 analyze_function
        $TOP/gcc/gcc/cgraphunit.c:649
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.


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

* [Bug c++/59270] [4.9 Regression] [c++11] ICE with decltype of a broken class
  2013-11-23 23:26 [Bug c++/59270] New: [4.9 Regression] [c++11] ICE with decltype of a broken class reichelt at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2014-01-15 10:58 ` ktkachov at gcc dot gnu.org
@ 2014-01-15 11:00 ` paolo.carlini at oracle dot com
  2014-01-15 11:30 ` ktkachov at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-15 11:00 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Paolo Carlini <paolo.carlini at oracle dot com> ---
AFAICS is completely unrelated.


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

* [Bug c++/59270] [4.9 Regression] [c++11] ICE with decltype of a broken class
  2013-11-23 23:26 [Bug c++/59270] New: [4.9 Regression] [c++11] ICE with decltype of a broken class reichelt at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2014-01-15 11:00 ` paolo.carlini at oracle dot com
@ 2014-01-15 11:30 ` ktkachov at gcc dot gnu.org
  2014-01-17 20:25 ` paolo at gcc dot gnu.org
  2014-01-17 20:26 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2014-01-15 11:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from ktkachov at gcc dot gnu.org ---
(In reply to Paolo Carlini from comment #3)
> AFAICS is completely unrelated.

Yes, I noticed now that it was expected fallout from
http://gcc.gnu.org/ml/gcc-patches/2014-01/msg00746.html

Sorry about the noise, ignore comment 2


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

* [Bug c++/59270] [4.9 Regression] [c++11] ICE with decltype of a broken class
  2013-11-23 23:26 [Bug c++/59270] New: [4.9 Regression] [c++11] ICE with decltype of a broken class reichelt at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2014-01-15 11:30 ` ktkachov at gcc dot gnu.org
@ 2014-01-17 20:25 ` paolo at gcc dot gnu.org
  2014-01-17 20:26 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: paolo at gcc dot gnu.org @ 2014-01-17 20:25 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> ---
Author: paolo
Date: Fri Jan 17 20:25:01 2014
New Revision: 206731

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

    PR c++/59270
    PR c++/58811
    * init.c (build_value_init_noctor): Don't pass error_mark_node to
    build_value_init.

/testsuite
2014-01-17  Paolo Carlini  <paolo.carlini@oracle.com>

    PR c++/59270
    PR c++/58811
    * g++.dg/cpp0x/decltype-incomplete1.C: New.
    * g++.dg/init/pr58811.C: Likewise.

Added:
    trunk/gcc/testsuite/g++.dg/cpp0x/decltype-incomplete1.C
    trunk/gcc/testsuite/g++.dg/init/pr58811.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/init.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug c++/59270] [4.9 Regression] [c++11] ICE with decltype of a broken class
  2013-11-23 23:26 [Bug c++/59270] New: [4.9 Regression] [c++11] ICE with decltype of a broken class reichelt at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2014-01-17 20:25 ` paolo at gcc dot gnu.org
@ 2014-01-17 20:26 ` paolo.carlini at oracle dot com
  6 siblings, 0 replies; 8+ messages in thread
From: paolo.carlini at oracle dot com @ 2014-01-17 20:26 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Fixed.


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

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

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-23 23:26 [Bug c++/59270] New: [4.9 Regression] [c++11] ICE with decltype of a broken class reichelt at gcc dot gnu.org
2013-11-25  9:16 ` [Bug c++/59270] " rguenth at gcc dot gnu.org
2014-01-15 10:52 ` paolo.carlini at oracle dot com
2014-01-15 10:58 ` ktkachov at gcc dot gnu.org
2014-01-15 11:00 ` paolo.carlini at oracle dot com
2014-01-15 11:30 ` ktkachov at gcc dot gnu.org
2014-01-17 20:25 ` paolo at gcc dot gnu.org
2014-01-17 20:26 ` paolo.carlini at oracle dot com

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