This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: bug?
- To: hchang-tky at umin dot ac dot jp
- Subject: Re: bug?
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Thu, 08 Jul 1999 23:01:34 -0600
- cc: egcs-bugs at egcs dot cygnus dot com
- Reply-To: law at cygnus dot com
In message <199907091712.NAA01134@hckb-13.c.u-tokyo.ac.jp>you write:
>
> When I compile and run the following program,
> I get an unexpected result.
> It prints
> > -1 0
> instead of
> > 0 1
>
> If I change N to 7, it works fine.
> Am I missing something?
>
> -------------------------------------------
>
> #include <stdio.h>
>
> #define N 8
>
> typedef struct {
> int base;
> int form[N];
> } frame;
>
> int main()
> {
> frame frame_stack[10], frames[10], *fp;
> int i;
>
> frame_stack[0].base = 0;
> frame_stack[1].base = 1;
> fp = frames;
> for(i=0;i<2;++i){
> *fp++ = frame_stack[i];
> }
>
> printf("%d %d\n", frames[0].base, frames[1].base);
> return 0;
Unfortunately you did not file a complete bug report. You didn't mention
what configuration shows this problem. You did not mention what version of
egcs you were using, nor did you mention what compile flags you used.
Please see the FAQ for help in filing a complete bug report.
jeff
> }
>