This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libobjc/25347] New: objc_alignof_type gets the wrong alignment for unions (objc_sizeof_type is wrong also too)
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 11 Dec 2005 06:35:16 -0000
- Subject: [Bug libobjc/25347] New: objc_alignof_type gets the wrong alignment for unions (objc_sizeof_type is wrong also too)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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