public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/114927] New: ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
@ 2024-05-02 21:59 sjames at gcc dot gnu.org
  2024-05-03  1:13 ` [Bug c/114927] " sjames at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-05-02 21:59 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927

            Bug ID: 114927
           Summary: ICE when building Emacs with -std=c23 -flto (error:
                    ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: ice-checking
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 58090
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58090&action=edit
process.i.xz

Hit this when building Emacs with -std=c23 (which bleeding-edge autoconf now
defaults to).

(Calling this an FE issue for now unless proven otherwise, given richi's
comments on my other bug wrt where the checking is done.)

```
$ gcc -c ./process.i -std=c23 -flto
process.c:8920:1: error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’
 8920 | }
      | ^
 <function_type 0x7f39a8324d20
    type <integer_type 0x7f39a98235e8 int sizes-gimplified public SI
        size <integer_cst 0x7f39a9825198 constant 32>
        unit-size <integer_cst 0x7f39a98251b0 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set 11 canonical-type
0x7f39a98235e8 precision:32 min <integer_cst 0x7f39a9825150 -2147483648> max
<integer_cst 0x7f39a9825168 2147483647>
        pointer_to_this <pointer_type 0x7f39a982bb28>>
    QI
    size <integer_cst 0x7f39a9825048 type <integer_type 0x7f39a98230a8
bitsizetype> constant 8>
    unit-size <integer_cst 0x7f39a9825060 type <integer_type 0x7f39a9823000
sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
    arg-types <tree_list 0x7f39a87ecc80
        value <pointer_type 0x7f39a81e4dc8 type <record_type 0x7f39a81e4d20
Lisp_Process>
            unsigned DI
            size <integer_cst 0x7f39a9802f48 constant 64>
            unit-size <integer_cst 0x7f39a9802f60 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a9852d20>
        chain <tree_list 0x7f39a981dd98 value <void_type 0x7f39a9823f18 void>>>
    pointer_to_this <pointer_type 0x7f39a67daa80>>
 <function_type 0x7f39a682e498
    type <integer_type 0x7f39a912c2a0 pid_t sizes-gimplified public SI
        size <integer_cst 0x7f39a9825198 constant 32>
        unit-size <integer_cst 0x7f39a98251b0 constant 4>
        align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a98235e8 precision:32 min <integer_cst 0x7f39a9825150 -2147483648> max
<integer_cst 0x7f39a9825168 2147483647>
        pointer_to_this <pointer_type 0x7f39a98540a8>>
    QI
    size <integer_cst 0x7f39a9825048 type <integer_type 0x7f39a98230a8
bitsizetype> constant 8>
    unit-size <integer_cst 0x7f39a9825060 type <integer_type 0x7f39a9823000
sizetype> constant 1>
    align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a8324d20
    arg-types <tree_list 0x7f39a683bbe0
        value <pointer_type 0x7f39a81e4dc8 type <record_type 0x7f39a81e4d20
Lisp_Process>
            unsigned DI
            size <integer_cst 0x7f39a9802f48 constant 64>
            unit-size <integer_cst 0x7f39a9802f60 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7f39a9852d20>
        chain <tree_list 0x7f39a981dd98 value <void_type 0x7f39a9823f18 void>>>
    pointer_to_this <pointer_type 0x7f39a682e5e8>>
during IPA pass: *free_lang_data
process.c:8920:1: internal compiler error: ‘verify_type’ failed
0x55d8b1cdf912 verify_type(tree_node const*)
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/tree.cc:14395
0x55d8b3c5b46b free_lang_data
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1134
0x55d8b3c5b46b execute
       
/usr/src/debug/sys-devel/gcc-14.0.1_pre20240430/gcc-14.1.0-RC-20240430/gcc/ipa-free-lang-data.cc:1176
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

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

* [Bug c/114927] ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
  2024-05-02 21:59 [Bug c/114927] New: ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
@ 2024-05-03  1:13 ` sjames at gcc dot gnu.org
  2024-05-03  1:18 ` [Bug c/114927] [14/15 Regression] " pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-05-03  1:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927

Sam James <sjames at gcc dot gnu.org> changed:

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

--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
Reduced:
```
typedef int pid_t;
struct Lisp_Process;
int gnutls_try_handshake(struct Lisp_Process *);
struct Lisp_Process {
} Sprocess_send_string;
pid_t emacs_get_tty_pgrp(struct Lisp_Process *);
```

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

* [Bug c/114927] [14/15 Regression] ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
  2024-05-02 21:59 [Bug c/114927] New: ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
  2024-05-03  1:13 ` [Bug c/114927] " sjames at gcc dot gnu.org
@ 2024-05-03  1:18 ` pinskia at gcc dot gnu.org
  2024-05-03  5:56 ` uecker at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-05-03  1:18 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
            Summary|ICE when building Emacs     |[14/15 Regression] ICE when
                   |with -std=c23 -flto (error: |building Emacs with
                   |‘TYPE_CANONICAL’ has        |-std=c23 -flto (error:
                   |different ‘TYPE_CANONICAL’) |‘TYPE_CANONICAL’ has
                   |                            |different ‘TYPE_CANONICAL’)
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
           Keywords|                            |ice-on-valid-code
   Last reconfirmed|                            |2024-05-03

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed.

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

* [Bug c/114927] [14/15 Regression] ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
  2024-05-02 21:59 [Bug c/114927] New: ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
  2024-05-03  1:13 ` [Bug c/114927] " sjames at gcc dot gnu.org
  2024-05-03  1:18 ` [Bug c/114927] [14/15 Regression] " pinskia at gcc dot gnu.org
@ 2024-05-03  5:56 ` uecker at gcc dot gnu.org
  2024-05-07  7:46 ` rguenth at gcc dot gnu.org
  2024-05-18 15:43 ` sjames at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: uecker at gcc dot gnu.org @ 2024-05-03  5:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927

uecker at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=114574

--- Comment #3 from uecker at gcc dot gnu.org ---
Seems something still needs to be done regarding function types when the
TYPE_CANONICAL is set when completing the struct, see PR114574

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

* [Bug c/114927] [14/15 Regression] ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
  2024-05-02 21:59 [Bug c/114927] New: ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-05-03  5:56 ` uecker at gcc dot gnu.org
@ 2024-05-07  7:46 ` rguenth at gcc dot gnu.org
  2024-05-18 15:43 ` sjames at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-07  7:46 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|14.0                        |14.2

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 14.1 is being released, retargeting bugs to GCC 14.2.

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

* [Bug c/114927] [14/15 Regression] ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
  2024-05-02 21:59 [Bug c/114927] New: ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-05-07  7:46 ` rguenth at gcc dot gnu.org
@ 2024-05-18 15:43 ` sjames at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-05-18 15:43 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114927

Sam James <sjames at gcc dot gnu.org> changed:

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

--- Comment #5 from Sam James <sjames at gcc dot gnu.org> ---
Fixed now (PR114931).

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

end of thread, other threads:[~2024-05-18 15:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-02 21:59 [Bug c/114927] New: ICE when building Emacs with -std=c23 -flto (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
2024-05-03  1:13 ` [Bug c/114927] " sjames at gcc dot gnu.org
2024-05-03  1:18 ` [Bug c/114927] [14/15 Regression] " pinskia at gcc dot gnu.org
2024-05-03  5:56 ` uecker at gcc dot gnu.org
2024-05-07  7:46 ` rguenth at gcc dot gnu.org
2024-05-18 15:43 ` sjames 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).