public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/112487] New: GCC: 14: internal compiler error: in setup_one_parameter, at tree-inline.cc:3565
@ 2023-11-12  8:50 141242068 at smail dot nju.edu.cn
  2023-11-12 10:12 ` [Bug ipa/112487] [14 Regression] " xry111 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-11-12  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112487
           Summary: GCC: 14: internal compiler error: in
                    setup_one_parameter, at tree-inline.cc:3565
           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: ---

Compiler explorer: https://gcc.godbolt.org/z/fjErPvrvP

When compile this program with `gcc-14 -O1`, gcc crashes:
```
struct A { char i; };
struct B {
  struct C *p;
  struct A *q;
};
struct C { struct B a[1]; };
struct T { struct U *ptr; };

volatile struct T v;
void f1(volatile struct T v) { f2(v); }
void f2(volatile struct T *const v) { }
void bar() {
  struct U *ptr;
  f1(v);
}
```

The crash output pasted from compiler explorer:
```
<source>: In function 'f1':
<source>:10:32: warning: implicit declaration of function 'f2'; did you mean
'f1'? [-Wimplicit-function-declaration]
   10 | void f1(volatile struct T v) { f2(v); }
      |                                ^~
      |                                f1
<source>: At top level:
<source>:11:6: warning: conflicting types for 'f2'; have 'void(volatile struct
T * const)'
   11 | void f2(volatile struct T *const v) { }
      |      ^~
<source>:10:32: note: previous implicit declaration of 'f2' with type
'void(volatile struct T * const)'
   10 | void f1(volatile struct T v) { f2(v); }
      |                                ^~
during IPA pass: inline
<source>: In function 'f1':
<source>:10:32: internal compiler error: in setup_one_parameter, at
tree-inline.cc:3565
   10 | void f1(volatile struct T v) { f2(v); }
      |                                ^~~~~
0x238b15e internal_error(char const*, ...)
        ???:0
0xa11270 fancy_abort(char const*, int, char const*)
        ???:0
0x11c5051 optimize_inline_calls(tree_node*)
        ???:0
0xe69aeb inline_transform(cgraph_node*)
        ???:0
0xfec7fb execute_all_ipa_transforms(bool)
        ???:0
0xbfe2d9 cgraph_node::expand()
        ???:0
0xc027bb 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.
```

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

end of thread, other threads:[~2023-11-13 14:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-12  8:50 [Bug c/112487] New: GCC: 14: internal compiler error: in setup_one_parameter, at tree-inline.cc:3565 141242068 at smail dot nju.edu.cn
2023-11-12 10:12 ` [Bug ipa/112487] [14 Regression] " xry111 at gcc dot gnu.org
2023-11-12 19:27 ` [Bug ipa/112487] [11/12/13/14 Regression] ICE in setup_one_parameter with conflicting types pinskia at gcc dot gnu.org
2023-11-13  8:27 ` rguenth at gcc dot gnu.org
2023-11-13 14:01 ` cvs-commit at gcc dot gnu.org
2023-11-13 14:10 ` [Bug ipa/112487] [11/12/13 " rguenth 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).