This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Packed structures in anonymous unions causes internal compiler error
- To: gcc-bugs at gcc dot gnu dot org
- Subject: Packed structures in anonymous unions causes internal compiler error
- From: Ganesan Rajagopal <rganesan at novell dot com>
- Date: Fri, 24 Sep 1999 17:47:21 +0530 (IST)
Hi,
The following simple program causes a internal compiler both Sparc
Solaris 2.6 and Intel Solaris 2.6 (I haven't had a chance to test on
other platforms) with gcc 2.95.1.
#pragma pack(1)
struct packed_s { char c; int i; };
#pragma pack()
int
main()
{
union { struct packed_s junk1; short junk2; };
junk1.c = 0;
}
gcc version is
Reading specs from /usr/local/gcc-2.95.1/lib/gcc-lib/sparc-sun-solaris2.6/2.95.1/specs
gcc version 2.95.1 19990816 (release)
Ganesan
--
R. Ganesan (rganesan@novell.com) | Ph: 91-80-5721856 Ext: 2149
Novell India Development Center. | #include <std_disclaimer.h>