These two tests test the sizeof operation. They are actually the same except at one place, that is, the compiler they use to compile the input file. SizeofTest_GNU uses GNU compiler (g++) and SizeofTest_Intel use Intel compiler (icc). So, in order to run the tests successfully, both GNU and Intel compiler are required.

The reason of testing the sizeof operation is that the ROSE front-end sometimes computes the value of a sizeof operation and insert it as an extra node into the AST in front of the sizeof operation node. So we want to make sure that the pre-computed value of sizeof operation is always correct and consistent with the value in program execution. Hence we wrote a translator to traverse the ROSE AST and compared each pre-computed sizeof value with the exact value in program execution. We tested the input file on both GNU compiler and Intel compiler. The results showed that the sizeof values generated by ROSE frontend are always consistent with the values generated by Intel compiler, but not with GNU compiler. Currently, the only difference between GNU compiler and ROSE front-end occurs when processing the #pragma pack(n) directive. An example is shown below:

#pragma pack(1)
//nested struct with #pragma pack directive
struct outterStruct
{
	int intMember;
	float floatMember;
	char unpackMember;
#pragma pack(2)
	struct innerStruct
	{
		char charMember;
		double doubleMember;
	}inner;
};

The sizeof(struct outterStruct) operation returns 20 on GNU compiler and 19 on ROSE front-end and Intel compiler. The reason for this difference is that both ROSE front-end and Intel compiler will align the members of outterStruct on 1-byte boundaries. However, the GNU compiler will align the members of outterStruct on 2-byte boundaries because it sees a #pragma pack(2) directive precedes the innerStruct. To summary, in ROSE front-end and Intel compiler, a #pragma pack(n) directive only affects data types defined after it. But in a GNU compiler, a #pragma pack(n) directive also affects the data type within which it resides, if any.  
