public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/110737] New: GCC: internal compiler error: Segmentation fault when processing __builtin_isinf and _Atomic long double together
@ 2023-07-19  8:19 141242068 at smail dot nju.edu.cn
  2023-07-19  9:38 ` [Bug c/110737] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-07-19  8:19 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110737
           Summary: GCC: internal compiler error: Segmentation fault when
                    processing __builtin_isinf and _Atomic long double
                    together
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 141242068 at smail dot nju.edu.cn
  Target Milestone: ---

When attempting to compile below program using gcc-14 with option `gcc-14
small.c`, gcc throws internal error.
```
_Atomic long double c;
void f(void);
void g(void) { __builtin_isinf(c /= f()); }
```

The output of gcc is pasted below:
```
<source>: In function 'g':
<source>:3:1: error: void value not ignored as it ought to be
    3 | void g(void) { __builtin_isinf(c /= f()); }
      | ^~~~
<source>:3:34: internal compiler error: Segmentation fault
    3 | void g(void) { __builtin_isinf(c /= f()); }
      |                                  ^~
0x21594ee internal_error(char const*, ...)
        ???:0
0xd6ec47 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ???:0
0xd7182a gimplify_stmt(tree_node**, gimple**)
        ???:0
0xd6f79b gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ???:0
0xd7182a gimplify_stmt(tree_node**, gimple**)
        ???:0
0xd6ec6a gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ???:0
0xd7182a gimplify_stmt(tree_node**, gimple**)
        ???:0
0xd6ec04 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*),
int)
        ???:0
0xd7182a gimplify_stmt(tree_node**, gimple**)
        ???:0
0xd72cc3 gimplify_body(tree_node*, bool)
        ???:0
0xd7311f gimplify_function_tree(tree_node*)
        ???:0
0xbaffa7 cgraph_node::analyze()
        ???:0
0xbb3af1 symbol_table::finalize_compilation_unit()
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
```

The above segment fault can be verified at compiler explorer:
https://gcc.godbolt.org/z/Ghxe5Mc6e

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

end of thread, other threads:[~2023-07-19 22:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-19  8:19 [Bug c/110737] New: GCC: internal compiler error: Segmentation fault when processing __builtin_isinf and _Atomic long double together 141242068 at smail dot nju.edu.cn
2023-07-19  9:38 ` [Bug c/110737] " rguenth at gcc dot gnu.org
2023-07-19 20:42 ` pinskia at gcc dot gnu.org
2023-07-19 21:00 ` pinskia at gcc dot gnu.org
2023-07-19 21:35 ` pinskia at gcc dot gnu.org
2023-07-19 22:29 ` 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).