The following source should compile on powerpc-darwin with no errors: struct a { double a[2]; int i; }; struct b { double a; double b; int i; }; int g[sizeof(struct a) == sizeof(struct b)?1:-1]; But currently it does not because we don't take into account that the type of the array.
From the sound of it, AIX has the same issue. I have the simple fix but I cannot test it.
Your testcase fails on powerpc64-linux with -malign-power
Subject: Bug 25299 Author: amodra Date: Mon Dec 12 01:28:50 2005 New Revision: 108393 URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=108393 Log: PR target/25299 * config/rs6000/rs6000.c (rs6000_special_round_type_align): Increase alignment to doubleword if the first field is a double array. * config/rs6000/linux64.h (TARGET_ALIGN_NATURAL): Define. Modified: trunk/gcc/ChangeLog trunk/gcc/config/rs6000/linux64.h trunk/gcc/config/rs6000/rs6000.c
Fixed.