testcase:
/* { dg-options "-fgnu-runtime" } */
/* { dg-do run } */

#include <objc/encoding.h>
#include <stdlib.h>

union f
{
  char i;
  double f1;
  short t;
};


int main(void)
{
  if (objc_sizeof_type (@encode (union f)) != sizeof(union f))
   abort ();
  if (objc_alignof_type (@encode (union f)) != __alignof__(union f))
   abort ();
  return 0;
}


-- 
           Summary: objc_alignof_type gets the wrong alignment for unions
                    (objc_sizeof_type is wrong also too)
           Product: gcc
           Version: 4.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libobjc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc-darwin, powerpc-aix


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25347

Reply via email to