public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/105150] [9/10/11/12 Regression] ICE with -Ofast: verify_gimple failed
Date: Tue, 05 Apr 2022 09:21:19 +0000	[thread overview]
Message-ID: <bug-105150-4-ZAZlba2F7Q@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-105150-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
So it's GENERIC folding and get_call_combined_fn as opposed to the GIMPLE
variant does not verify argument compatibility.  We have

 <call_expr 0x7ffff6524118
    type <real_type 0x7ffff653b348 double DF
        size <integer_cst 0x7ffff6517d50 constant 64>
        unit-size <integer_cst 0x7ffff6517d68 constant 8>
        align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff653b348 precision:64
        pointer_to_this <pointer_type 0x7ffff653b930>>
    readonly
    fn <addr_expr 0x7ffff66652c0
        type <pointer_type 0x7ffff6650dc8 type <function_type 0x7ffff6650d20>
            unsigned DI size <integer_cst 0x7ffff6517d50 64> unit-size
<integer_cst 0x7ffff6517d68 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0x7ffff6650dc8>
        readonly constant
        arg:0 <function_decl 0x7ffff65b1700 sqrt type <function_type
0x7ffff6650b28>
            readonly addressable used nothrow public external built-in decl_3
decl_5 decl_6 QI defer-output t.c:5:1
            align:8 warn_if_not_align:0 built-in: BUILT_IN_NORMAL:BUILT_IN_SQRT
            attributes <tree_list 0x7ffff65afb18
                purpose <identifier_node 0x7ffff653fbe0 nothrow>
                chain <tree_list 0x7ffff65afaf0
                    purpose <identifier_node 0x7ffff653fc30 leaf>
                    chain <tree_list 0x7ffff65afac8
                        purpose <identifier_node 0x7ffff65322d0 const tree_0
                            rid 0x7ffff65322d0 "const">>>>>
        t.c:5:1 start: t.c:5:1 finish: t.c:5:1>
    arg:0 <integer_cst 0x7ffff6537108 type <integer_type 0x7ffff65335e8 int>
constant 1>

where the CALL_EXPR_FN is an ADDR_EXPR of pointer-to unprototyped
and the decl is unprototyped as well but it got BUILT_IN_NORMAL:BUILT_IN_SQRT
and the inherited attributes.  IMHO that's a frontend problem - it should
not do that.

There's nothing get_call_combined_fn can do here if we do not want to
resort to check against the actual built-in decl that is registered
via builtin_decl_explicit ().

  parent reply	other threads:[~2022-04-05  9:21 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-04 16:43 [Bug c/105150] New: " gscfq@t-online.de
2022-04-04 17:16 ` [Bug tree-optimization/105150] " jakub at gcc dot gnu.org
2022-04-04 17:58 ` jakub at gcc dot gnu.org
2022-04-05  6:52 ` rguenth at gcc dot gnu.org
2022-04-05  9:21 ` rguenth at gcc dot gnu.org [this message]
2022-04-05  9:30 ` [Bug c/105150] " pinskia at gcc dot gnu.org
2022-04-06  8:13 ` cvs-commit at gcc dot gnu.org
2022-04-06 14:49 ` cvs-commit at gcc dot gnu.org
2022-04-07  7:13 ` cvs-commit at gcc dot gnu.org
2022-04-07  7:20 ` [Bug c/105150] [9/10/11 " jakub at gcc dot gnu.org
2022-04-07  7:21 ` rguenther at suse dot de
2022-05-27  9:47 ` [Bug c/105150] [10/11 " rguenth at gcc dot gnu.org
2022-06-28 10:48 ` jakub at gcc dot gnu.org
2023-07-07 10:42 ` [Bug c/105150] [11 " rguenth at gcc dot gnu.org
2024-03-10  4:39 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-105150-4-ZAZlba2F7Q@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).