public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/98597] New: [11 Regression] ICE in print_mem_ref since r11-6508-gabb1b6058c09a7c0
@ 2021-01-08  8:20 marxin at gcc dot gnu.org
  2021-01-08  8:20 ` [Bug tree-optimization/98597] " marxin at gcc dot gnu.org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-01-08  8:20 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98597
           Summary: [11 Regression] ICE in print_mem_ref since
                    r11-6508-gabb1b6058c09a7c0
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: msebor at gcc dot gnu.org
  Target Milestone: ---

One more ICE I found:

$ cat x.C
struct shared_count {
  shared_count() {}
  shared_count(shared_count &r) : pi(r.pi) {}
  int pi;
};
struct shared_ptr {
  int ptr;
  shared_count refcount;
};
struct Bar {
  Bar(int, shared_ptr);
};
void g() {
  shared_ptr foo;
  Bar(0, foo);
}

$ g++ x.C -O2 -Wuninitialized -c
In copy constructor ‘shared_ptr::shared_ptr(shared_ptr&)’,
    inlined from ‘void g()’ at x.C:15:13:
x.C:6:8: warning: ‘foo.shared_ptr::ptr’ is used uninitialized [-Wuninitialized]
    6 | struct shared_ptr {
      |        ^~~~~~~~~~
x.C: In function ‘void g()’:
x.C:14:14: note: ‘foo’ declared here
   14 |   shared_ptr foo;
      |              ^~~
‘
during GIMPLE pass: uninit
Segmentation fault
   13 | void g() {
      |      ^
0x10bf64f crash_signal
        /home/marxin/Programming/gcc/gcc/toplev.c:327
0xbc57bc print_mem_ref
        /home/marxin/Programming/gcc/gcc/c-family/c-pretty-print.c:1851
0x9c4b2f dump_expr
        /home/marxin/Programming/gcc/gcc/cp/error.c:2366
0x9c97d0 expr_to_string(tree_node*)
        /home/marxin/Programming/gcc/gcc/cp/error.c:3187
0x9c9f0c cp_printer
        /home/marxin/Programming/gcc/gcc/cp/error.c:4355
0x1c30a8c pp_format(pretty_printer*, text_info*)
        /home/marxin/Programming/gcc/gcc/pretty-print.c:1475
0x1c148e6 diagnostic_report_diagnostic(diagnostic_context*, diagnostic_info*)
        /home/marxin/Programming/gcc/gcc/diagnostic.c:1216
0x1c16e48 diagnostic_impl
        /home/marxin/Programming/gcc/gcc/diagnostic.c:1366
0x1c16e48 warning_at(unsigned int, int, char const*, ...)
        /home/marxin/Programming/gcc/gcc/diagnostic.c:1503
0x12d0e16 maybe_warn_operand
        /home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:418
0x12d423f warn_uninitialized_vars
        /home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:657
0x12d83f2 execute
        /home/marxin/Programming/gcc/gcc/tree-ssa-uninit.c:3019
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.

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

end of thread, other threads:[~2021-01-15 18:22 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-08  8:20 [Bug tree-optimization/98597] New: [11 Regression] ICE in print_mem_ref since r11-6508-gabb1b6058c09a7c0 marxin at gcc dot gnu.org
2021-01-08  8:20 ` [Bug tree-optimization/98597] " marxin at gcc dot gnu.org
2021-01-11 23:29 ` slyfox at gcc dot gnu.org
2021-01-12  8:43 ` marxin at gcc dot gnu.org
2021-01-12  8:43 ` marxin at gcc dot gnu.org
2021-01-12 18:39 ` jakub at gcc dot gnu.org
2021-01-12 19:02 ` jakub at gcc dot gnu.org
2021-01-12 20:03 ` cvs-commit at gcc dot gnu.org
2021-01-12 20:10 ` jakub at gcc dot gnu.org
2021-01-13 11:49 ` jakub at gcc dot gnu.org
2021-01-13 13:49 ` jakub at gcc dot gnu.org
2021-01-13 14:05 ` jakub at gcc dot gnu.org
2021-01-13 14:15 ` jakub at gcc dot gnu.org
2021-01-13 16:18 ` msebor at gcc dot gnu.org
2021-01-15 18:22 ` cvs-commit 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).