This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libobjc/25347] New: objc_alignof_type gets the wrong alignment for unions (objc_sizeof_type is wrong also too)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]