public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/115290] New: tree check fail in c_tree_printer, at c/c-objc-common.cc:330
@ 2024-05-30  7:50 dcb314 at hotmail dot com
  2024-05-30 14:50 ` [Bug c/115290] [12/13/14/15 Regression] " pinskia at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: dcb314 at hotmail dot com @ 2024-05-30  7:50 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115290
           Summary: tree check fail in c_tree_printer, at
                    c/c-objc-common.cc:330
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For this C code:

$ more bug1029.c
typedef enum { SERVER_HELLO_DONE } message_type_t;
message_type_t handshakes[256][32], tls13_handshakes[256][32];
void main() { (0 ? tls13_handshakes : handshakes) == tls13_handshakes; }
$ 

compiled as follows:

$ ~/gcc/results/bin/gcc -c -Wall bug1029.c 

does this:

bug1029.c:3:6: warning: return type of ‘main’ is not ‘int’ [-Wmain]
    3 | void main() { (0 ? tls13_handshakes : handshakes) == tls13_handshakes;
}
      |      ^~~~
bug1029.c: In function ‘main’:
bug1029.c:3:51: warning: comparison between two arrays [-Warray-compare]
    3 | void main() { (0 ? tls13_handshakes : handshakes) == tls13_handshakes;
}
      |                                                   ^~

tree check: expected tree that contains ‘decl minimal’ structure, have
‘cond_exp
r’ in c_tree_printer, at c/c-objc-common.cc:330
    3 | void main() { (0 ? tls13_handshakes : handshakes) == tls13_handshakes;
}
      | ^~~~
0x81bb1e tree_contains_struct_check_failed(tree_node const*,
tree_node_structure
_enum, char const*, int, char const*)
        ../../trunk.20210101/gcc/tree.cc:9169
0x6e18a8 contains_struct_check(tree_node*, tree_node_structure_enum, char
const*
, int, char const*)
        ../../trunk.20210101/gcc/tree.h:3770
0x6e18a8 c_tree_printer
        ../../trunk.20210101/gcc/c/c-objc-common.cc:330

The bug first appeared sometime before git hash 28b508233a12c132.

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

end of thread, other threads:[~2024-06-20  9:32 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-30  7:50 [Bug c/115290] New: tree check fail in c_tree_printer, at c/c-objc-common.cc:330 dcb314 at hotmail dot com
2024-05-30 14:50 ` [Bug c/115290] [12/13/14/15 Regression] " pinskia at gcc dot gnu.org
2024-05-31  6:45 ` rguenth at gcc dot gnu.org
2024-06-17 13:20 ` jakub at gcc dot gnu.org
2024-06-17 17:24 ` cvs-commit at gcc dot gnu.org
2024-06-17 17:27 ` cvs-commit at gcc dot gnu.org
2024-06-17 17:28 ` cvs-commit at gcc dot gnu.org
2024-06-17 17:30 ` [Bug c/115290] [12 " jakub at gcc dot gnu.org
2024-06-20  8:54 ` cvs-commit at gcc dot gnu.org
2024-06-20  9:15 ` rguenth at gcc dot gnu.org
2024-06-20  9:32 ` jakub 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).