https://gcc.gnu.org/bugzilla/show_bug.cgi?id=123309
Bug ID: 123309
Summary: checking ICE with transparent union
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: uecker at gcc dot gnu.org
Target Milestone: ---
Investigating the root cause for PR121081 I found some other issue related to
inconsistent handling of atomic in the C FE.
https://godbolt.org/z/66srqbare
typedef union {
const struct sockaddr *_Atomic __sockaddr__;
} __CONST_SOCKADDR_ARG __attribute__((transparent_union));
extern int sendto (__CONST_SOCKADDR_ARG __addr);
int sendto(const struct sockaddr *_Atomic to)
{
const struct sockaddr *_Atomic *p = &to;
}