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

--- Comment #8 from uecker at gcc dot gnu.org ---
Some tests for pointers to struct w and w/o tag and also with one incomplete
struct.

https://godbolt.org/z/ePcoTTeMq

#if 1
#define tag
#endif

int f2(void *x, void *y)
{
  typedef struct tag { int i1; } s1;
  s1 **s1p = x;
  {
#if 0
    typedef struct tag /*{ int i1; }*/ s2;
#else
    typedef struct tag { int i1; } s2;
#endif
    s2 **s2p = y;
    *s1p = &(s1){ 2 };
    *s2p = (void*)&(s1){ 3 };
     return (*s1p)->i1 * 3;
  }
}

int main()
{
    struct tag { int i1; } *a;
    return f2(&a, &a);
}

Reply via email to