BUG: ARM Compiler Generates Bad Code for Structure Assignment (216336)



The information in this article applies to:

  • Microsoft Windows CE 2.10 Enhancement Pack for Windows CE Embedded Toolkit for Visual C++ 5.0, when used with:
    • the hardware: StrongArm Processor
  • Microsoft Windows CE Platform Builder 2.11, when used with:
    • the hardware: StrongArm Processor

This article was previously published under Q216336

SYMPTOMS

The ARM compiler for the products listed at the beginning of this article may generate incorrect code when you use a structure assignment construct. This problem may occur with or without optimizations enabled.

This problem does not occur when you build ARM programs by using the Platform Builder version 2.11 Visual Development Environment.

RESOLUTION

To work around this problem, manually copy the structures by using a memory copy routine or algorithm.

In Platform Builder, this problem only affects modules that are compiled in the platform build procedure. The included operating system source code has been validated with the supplied compiler; however, code that has been added or modified by a developer to adapt the operating system may encounter this problem. If the code that experiences the problem is in the ISV layer of the Microsoft Windows CE operating system model, use the Visual Development Environment to build the code instead.

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce Behavior

The following code sample generates incorrect code when it is compiled by using the ARM compiler without optimizations:
typedef struct { 
   int c [ 36 ]; 
} myStruct;

void main()
{
	myStruct A, B;
	A = B;
}
				

Modification Type:MajorLast Reviewed:11/18/2003
Keywords:kbbug kbpending KB216336