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

            Bug ID: 128789
           Summary: [16/17 Regression] C23: pointer member to a tagged
                    struct in a named address space rejected
           Product: gcc
           Version: 17.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vineetg at gcc dot gnu.org
  Target Milestone: ---
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu

In C23 mode (the default), a structure member that points to a tagged structure
in a named address space is rejected:

```c
struct S { int x; };
struct C { struct S __seg_gs *p; };
```

gcc -c t.c
t.c:2:19: error: 'struct S' and '__seg_gs struct S' are in disjoint named
address spaces

This works with -std=gnu17 (on trunk) and with GCC 16.1.

Bisected to r17-1272 (f803a34017ec, "c23: fix TBAA error for function returning
structure [PR125252]"), which was also  backported so 16.2 is affected too.

Reply via email to