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]

Packed structures in anonymous unions causes internal compiler error



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>


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