Bug 98540 - [11/12/13/14 Regression] ICE: error: type variant with 'TYPE_ALIAS_SET_KNOWN_P' since r7-6939-g853ef4e5632df328
Summary: [11/12/13/14 Regression] ICE: error: type variant with 'TYPE_ALIAS_SET_KNOWN_...
Status: RESOLVED DUPLICATE of bug 97990
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 11.0
: P2 normal
Target Milestone: 11.5
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code, lto
Depends on:
Blocks:
 
Reported: 2021-01-05 16:11 UTC by Matthias Klose
Modified: 2023-07-08 01:26 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail: 11.0
Last reconfirmed: 2021-01-05 00:00:00


Attachments
preprocessed source (947.07 KB, application/x-xz)
2021-01-05 16:11 UTC, Matthias Klose
Details
Reduced test-case (2.39 KB, text/plain)
2021-01-06 05:26 UTC, Martin Liška
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Klose 2021-01-05 16:11:45 UTC
Created attachment 49892 [details]
preprocessed source

seen with trunk 20210102, works without -flto (although the file takes 8min to build). compiler configure with --enable-checking=yes,rtl,extra

$ g++ -c -g -O3 -fstack-protector-strong -fopenmp -flto -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -mpopcnt -Wall -Wno-unused-result -Wno-date-time lambda.cpp.ii 
/packages/tmp/lambda-align2-2.0.0/src/lambda.cpp:100:1: error: type variant with 'TYPE_ALIAS_SET_KNOWN_P'
  100 | }
      | ^
 <vector_type 0x7f851c044a80
    type <integer_type 0x7f851bf0e498 short int sizes-gimplified asm_written public type_6 HI
        size <integer_cst 0x7f851bf11078 constant 16>
        unit-size <integer_cst 0x7f851bf11090 constant 2>
        align:16 warn_if_not_align:0 symtab:464622208 alias-set 22 canonical-type 0x7f851bf0e498 precision:16 min <integer_cst 0x7f851bf11018 -32768> max <integer_cst 0x7f851bf11048 32767>
        pointer_to_this <pointer_type 0x7f8514048540> reference_to_this <reference_type 0x7f851aafed20>>
    sizes-gimplified asm_written type_6 V8HI
    size <integer_cst 0x7f851beeff00 type <integer_type 0x7f851bf0e0a8 bitsizetype> constant 128>
    unit-size <integer_cst 0x7f851beeff18 type <integer_type 0x7f851bf0e000 sizetype> constant 16>
    align:128 warn_if_not_align:0 symtab:293846784 alias-set 22 canonical-type 0x7f851c044a80 nunits:8
    pointer_to_this <pointer_type 0x7f850e9d3348> reference_to_this <reference_type 0x7f8512bfa5e8>>
 <vector_type 0x7f84e8e561f8
    type <integer_type 0x7f851bf0e498 short int sizes-gimplified asm_written public type_6 HI
        size <integer_cst 0x7f851bf11078 constant 16>
        unit-size <integer_cst 0x7f851bf11090 constant 2>
        align:16 warn_if_not_align:0 symtab:464622208 alias-set 22 canonical-type 0x7f851bf0e498 precision:16 min <integer_cst 0x7f851bf11018 -32768> max <integer_cst 0x7f851bf11048 32767>
        pointer_to_this <pointer_type 0x7f8514048540> reference_to_this <reference_type 0x7f851aafed20>>
    sizes-gimplified type_6 V8HI
    size <integer_cst 0x7f851beeff00 type <integer_type 0x7f851bf0e0a8 bitsizetype> constant 128>
    unit-size <integer_cst 0x7f851beeff18 type <integer_type 0x7f851bf0e000 sizetype> constant 16>
    align:128 warn_if_not_align:0 symtab:0 alias-set 22 canonical-type 0x7f851c044a80 nunits:8>
during IPA pass: *free_lang_data
/packages/tmp/lambda-align2-2.0.0/src/lambda.cpp:100:1: internal compiler error: 'verify_type' failed
0x626011 verify_type(tree_node const*)
        ../../src/gcc/tree.c:14906
0x62a3d3 free_lang_data
        ../../src/gcc/tree.c:6436
0x62a3d3 execute
        ../../src/gcc/tree.c:6481
Please submit a full bug report,
with preprocessed source if appropriate.
Comment 1 Martin Liška 2021-01-05 16:24:29 UTC
I'm reducing that right now..
Comment 2 Martin Liška 2021-01-06 05:26:45 UTC
Created attachment 49894 [details]
Reduced test-case

Started with r7-6939-g853ef4e5632df328 and it was rejected before:

$ g++ lambda.cpp -O3 -Wall -flto -c -std=c++17
lambda.cpp: In function ‘void iterateMatchesFullSimd()’:
lambda.cpp:254:9: warning: typedef ‘using TBlastRecord = int’ locally defined but not used [-Wunused-local-typedefs]
  254 |   using TBlastRecord = int;
      |         ^~~~~~~~~~~~
lambda.cpp: At global scope:
lambda.cpp:258:1: error: type variant with ‘TYPE_ALIAS_SET_KNOWN_P’
  258 | }
      | ^
 <vector_type 0x7ffff755ba80
    type <integer_type 0x7ffff7415498 short int public type_6 HI
        size <integer_cst 0x7ffff7418078 constant 16>
        unit-size <integer_cst 0x7ffff7418090 constant 2>
        align:16 warn_if_not_align:0 symtab:0 alias-set 2 canonical-type 0x7ffff7415498 precision:16 min <integer_cst 0x7ffff7418018 -32768> max <integer_cst 0x7ffff7418048 32767>>
    sizes-gimplified type_6 HI size <integer_cst 0x7ffff7418078 16> unit-size <integer_cst 0x7ffff7418090 2>
    align:16 warn_if_not_align:0 symtab:0 alias-set 2 canonical-type 0x7ffff755ba80 nunits:1>
 <vector_type 0x7ffff75f0930
    type <integer_type 0x7ffff7415498 short int public type_6 HI
        size <integer_cst 0x7ffff7418078 constant 16>
        unit-size <integer_cst 0x7ffff7418090 constant 2>
        align:16 warn_if_not_align:0 symtab:0 alias-set 2 canonical-type 0x7ffff7415498 precision:16 min <integer_cst 0x7ffff7418018 -32768> max <integer_cst 0x7ffff7418048 32767>>
    sizes-gimplified type_6 HI size <integer_cst 0x7ffff7418078 16> unit-size <integer_cst 0x7ffff7418090 2>
    align:16 warn_if_not_align:0 symtab:0 alias-set 2 canonical-type 0x7ffff755ba80 nunits:1>
during IPA pass: *free_lang_data
lambda.cpp:258:1: internal compiler error: ‘verify_type’ failed
0x139f4d0 verify_type(tree_node const*)
	/home/marxin/Programming/gcc/gcc/tree.c:14906
0x13a2407 free_lang_data
	/home/marxin/Programming/gcc/gcc/tree.c:6436
0x13a2407 execute
	/home/marxin/Programming/gcc/gcc/tree.c:6481
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Comment 3 Richard Biener 2021-01-06 08:52:58 UTC
-flto is only adding the verification, I guess the error is in the middle-end or the frontend instead.
Comment 4 Jakub Jelinek 2021-05-14 09:54:18 UTC
GCC 8 branch is being closed.
Comment 5 Richard Biener 2021-06-01 08:19:23 UTC
GCC 9.4 is being released, retargeting bugs to GCC 9.5.
Comment 6 Richard Biener 2022-05-27 09:44:11 UTC
GCC 9 branch is being closed
Comment 7 Jakub Jelinek 2022-06-28 10:43:03 UTC
GCC 10.4 is being released, retargeting bugs to GCC 10.5.
Comment 8 Richard Biener 2023-07-07 10:38:47 UTC
GCC 10 branch is being closed.
Comment 9 Andrew Pinski 2023-07-08 01:26:23 UTC
Dup of bug 97990.

*** This bug has been marked as a duplicate of bug 97990 ***