Launchpad has imported 2 comments from the remote bug at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97892.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2020-11-18T13:21:32+00:00 Matthias Klose wrote:

seen with the gcc-10 branch and the trunk, gcc configured with 
--enable-checking=yes,extra,rtl

gcc-9 configured here with --enable-checking=release, so I don't know if
that's a regression.

$ cat qq.i 
int m(int a) { return sizeof((char[a])); };

$ gcc-9 -c qq.i 
qq.i: In function ‘m’:
qq.i:1:39: error: expected expression before ‘)’ token
    1 | int m(int a) { return sizeof((char[a])); };
      |                                       ^

$ gcc-10 -c qq.i 
qq.i: In function ‘m’:
qq.i:1:39: error: expected expression before ‘)’ token
    1 | int m(int a) { return sizeof((char[a])); };
      |                                       ^
qq.i:1:39: internal compiler error: tree check: expected class ‘type’, have 
‘exceptional’ (error_mark) in c_expr_sizeof_expr, at c/c-typeck.c:2946
0x7602ef tree_class_check_failed(tree_node const*, tree_code_class, char 
const*, int, char const*)
        ../../src/gcc/tree.c:9780
0x5c2697 tree_class_check(tree_node*, tree_code_class, char const*, int, char 
const*)
        ../../src/gcc/tree.h:3417
0x5c2697 c_expr_sizeof_expr(unsigned int, c_expr)
        ../../src/gcc/c/c-typeck.c:2946
0xa274b7 c_parser_sizeof_expression
        ../../src/gcc/c/c-parser.c:8348
0xa274b7 c_parser_unary_expression
        ../../src/gcc/c/c-parser.c:8245
0xa280fd c_parser_cast_expression
        ../../src/gcc/c/c-parser.c:8115
0xa28389 c_parser_binary_expression
        ../../src/gcc/c/c-parser.c:7918
0xa29365 c_parser_conditional_expression
        ../../src/gcc/c/c-parser.c:7652
0xa29980 c_parser_expr_no_commas
        ../../src/gcc/c/c-parser.c:7569
0xa29be1 c_parser_expression
        ../../src/gcc/c/c-parser.c:10644
0xa2a387 c_parser_expression_conv
        ../../src/gcc/c/c-parser.c:10677
0xa20861 c_parser_statement_after_labels
        ../../src/gcc/c/c-parser.c:6212
0xa21d11 c_parser_compound_statement_nostart
        ../../src/gcc/c/c-parser.c:5805
0xa407c4 c_parser_compound_statement
        ../../src/gcc/c/c-parser.c:5617
0xa42281 c_parser_declaration_or_fndef
        ../../src/gcc/c/c-parser.c:2505
0xa4a3f3 c_parser_external_declaration
        ../../src/gcc/c/c-parser.c:1745
0xa4aef1 c_parser_translation_unit
        ../../src/gcc/c/c-parser.c:1618
0xa4aef1 c_parse_file()
        ../../src/gcc/c/c-parser.c:21752
0xaa21fb c_common_parse_file()
        ../../src/gcc/c-family/c-opts.c:1190
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-10/+bug/1904630/comments/5

------------------------------------------------------------------------
On 2020-11-18T13:34:18+00:00 Marxin-m wrote:

It's at least as old as GCC 4.8.0.

Reply at:
https://bugs.launchpad.net/ubuntu/+source/gcc-10/+bug/1904630/comments/6


** Changed in: gcc
       Status: Unknown => Confirmed

** Changed in: gcc
   Importance: Unknown => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1904630

Title:
  gcc-10 compilation failure in c_expr_sizeof_expr

To manage notifications about this bug go to:
https://bugs.launchpad.net/gcc/+bug/1904630/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to