public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/105150] New: [9/10/11/12 Regression] ICE with -Ofast: verify_gimple failed
@ 2022-04-04 16:43 gscfq@t-online.de
  2022-04-04 17:16 ` [Bug tree-optimization/105150] " jakub at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: gscfq@t-online.de @ 2022-04-04 16:43 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 105150
           Summary: [9/10/11/12 Regression] ICE with -Ofast: verify_gimple
                    failed
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to r6, at -Ofast :


$ cat z1.c
#define A(name) __typeof (__builtin_##name (0)) name (); \
  float name##1 () { return !name (1); } \
  double name##2 () { return name (1.0L); }
#define B(name) A(name) A(name##l)
B (sqrt)


$ gcc-5 -c z1.c -Ofast
$
$ gcc-12-20220403 -c z1.c -Ofast
z1.c: In function 'sqrt1':
z1.c:2:36: warning: 'sqrt' argument 1 type is 'int' where 'double' is expected
in a call to built-in function declared without prototype
[-Wbuiltin-declaration-mismatch]
    2 |   float name##1 () { return !name (1); } \
      |                                    ^
z1.c:4:17: note: in expansion of macro 'A'
    4 | #define B(name) A(name) A(name##l)
      |                 ^
z1.c:5:1: note: in expansion of macro 'B'
    5 | B (sqrt)
      | ^
z1.c:5:4: note: built-in 'sqrt' declared here
    5 | B (sqrt)
      |    ^~~~
z1.c:1:49: note: in definition of macro 'A'
    1 | #define A(name) __typeof (__builtin_##name (0)) name (); \
      |                                                 ^~~~
z1.c:5:1: note: in expansion of macro 'B'
    5 | B (sqrt)
      | ^
z1.c: In function 'sqrt2':
z1.c:3:36: warning: 'sqrt' argument 1 type is 'long double' where 'double' is
expected in a call to built-in function declared without prototype
[-Wbuiltin-declaration-mismatch]
    3 |   double name##2 () { return name (1.0L); }
      |                                    ^~~~
z1.c:4:17: note: in expansion of macro 'A'
    4 | #define B(name) A(name) A(name##l)
      |                 ^
z1.c:5:1: note: in expansion of macro 'B'
    5 | B (sqrt)
      | ^
z1.c:5:4: note: built-in 'sqrt' declared here
    5 | B (sqrt)
      |    ^~~~
z1.c:1:49: note: in definition of macro 'A'
    1 | #define A(name) __typeof (__builtin_##name (0)) name (); \
      |                                                 ^~~~
z1.c:5:1: note: in expansion of macro 'B'
    5 | B (sqrt)
      | ^
z1.c: In function 'sqrtl1':
z1.c:2:36: warning: 'sqrtl' argument 1 type is 'int' where 'long double' is
expected in a call to built-in function declared without prototype
[-Wbuiltin-declaration-mismatch]
    2 |   float name##1 () { return !name (1); } \
      |                                    ^
z1.c:4:25: note: in expansion of macro 'A'
    4 | #define B(name) A(name) A(name##l)
      |                         ^
z1.c:5:1: note: in expansion of macro 'B'
    5 | B (sqrt)
      | ^
z1.c:5:4: note: built-in 'sqrtl' declared here
    5 | B (sqrt)
      |    ^~~~
z1.c:1:49: note: in definition of macro 'A'
    1 | #define A(name) __typeof (__builtin_##name (0)) name (); \
      |                                                 ^~~~
z1.c:5:1: note: in expansion of macro 'B'
    5 | B (sqrt)
      | ^
z1.c: In function 'sqrt1':
z1.c:5:4: error: mismatching comparison operand types
    5 | B (sqrt)
      |    ^~~~
z1.c:2:9: note: in definition of macro 'A'
    2 |   float name##1 () { return !name (1); } \
      |         ^~~~
z1.c:5:1: note: in expansion of macro 'B'
    5 | B (sqrt)
      | ^
int
double
if (1 == 0.0) goto <D.1991>; else goto <D.1992>;
z1.c:5:4: internal compiler error: 'verify_gimple' failed
    5 | B (sqrt)
      |    ^~~~
z1.c:2:9: note: in definition of macro 'A'
    2 |   float name##1 () { return !name (1); } \
      |         ^~~~
z1.c:5:1: note: in expansion of macro 'B'
    5 | B (sqrt)
      | ^
0xe5ecad verify_gimple_in_seq(gimple*)
        ../../gcc/tree-cfg.cc:5213
0xad1ac1 gimplify_body(tree_node*, bool)
        ../../gcc/gimplify.cc:16438
0xad1d67 gimplify_function_tree(tree_node*)
        ../../gcc/gimplify.cc:16509
0x8e2d87 cgraph_node::analyze()
        ../../gcc/cgraphunit.cc:675
0x8e6036 analyze_functions
        ../../gcc/cgraphunit.cc:1240
0x8e720d symbol_table::finalize_compilation_unit()
        ../../gcc/cgraphunit.cc:2500

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

end of thread, other threads:[~2024-03-10  4:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-04 16:43 [Bug c/105150] New: [9/10/11/12 Regression] ICE with -Ofast: verify_gimple failed 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
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

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