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

How should we go about fixing this problem?


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.