This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug or specification ? (gcc 3.0)
- To: bug-gcc at gnu dot org
- Subject: bug or specification ? (gcc 3.0)
- From: Hideo Saito <saito at densan dot co dot jp>
- Date: Fri, 22 Jun 2001 17:10:08 +0900
To : bug-gcc@gnu.org
From: saito@densan.co.jp (Hideo Saito)
Title: bug or specification ? (gcc 3.0)
Hello. I am H.Saito, from Japan. I use NetBSD, mips3 and ELF.
This sss.c program can't execute similarly with gcc-2.95.2.
result of gcc 2.95.2
0
10
result of gcc 3.0
10
0
I hope that gcc 3.0 generates same code at NOTICE with gcc 2.95.2.
Thank you. Good bye.
---sss.c------------------------------------------------------------
#include <stdio.h>
struct sss {
int x, y, z;
} sss0, sss1, *p;
main()
{
p = &sss0;
p->x = xxx(); /* NOTICE */
printf("%d\n", sss0.x);
printf("%d\n", sss1.x);
}
xxx()
{
p = &sss1;
return (10);
}