This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
On Wed, Nov 17, 2004 at 03:03:14PM -0500, Thompson, David H. wrote:
> In the compiler shipped with the vxWorks 5.5.1 we have found a bug when
> -O2 is used. The compiler version is 2.9.6+, the error happens on both
> the Solaris host and on a Linux host. The target is PPC. Has anyone
> seen this in other versions of the compiler or know what the fix is?
>
> #include <stdio.h>
>
>
> int test(int argc,char * argv[])
> {
>
> double stack[]={0.0,1.0};
> double * pStack=&stack[0];
> double response;
>
> response=(*pStack==*(pStack+1));
> printf("Response=%f\n",response);
> return 0;
> }
>
> Response gets set to 1 instead of the expected 0.
Just a data point, works fine here on gcc 3.4.2.
--L
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |