This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

bug or specification ? (gcc 3.0)


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);
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]