assertion on initialized struct in non zero address space

Consider :

struct _st {
  int var1;
  int var2;
} s __attribute ((address_space(1))) = {1, 1};

When it gets to InitListChecker::CheckListElementTypes()
DeclType->isStructureType() returns false and eventually the function
asserts.

How should we go about fixing this problem?

Regards,

Alireza Moshtaghi
Senior Software Engineer
Development Systems, Microchip Technology

Hi Alireza,

This turned out to be some bugs in the type predicates. Type::isStructureType should look through ASQualTypes to see that the underlying type is a struct. I fixed this and some other related bugs and checked in your testcase.

Thanks!

-Chris