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]

scheduling problem on solaris2.6


Hello,

I found a problem on sparc-sun-solaris2.6. The code

long double
bug(long double src)
{
	if (src > -0.1 && src < 0.1) {
		int i;
		long double r = 1.0;
		long double k = 1.0;
		long double s = 0.0;
		for (i = 1 ; i < 10 ; i++) {
			r *= src;
			k *= (long double)i;
			s += r / k;
		}
		src = s;
	}
	return src;
}

generates the output below when compiled with -O2:

bug.c: In function `bug':
bug.c:17: Internal compiler error in schedule_insns, at sched-rgn.c:3070
Please submit a full bug report, with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

When I change the 'long double' into 'double' the code compiles ok.
I do not see this problem on i386 and c4x.

	Herman.

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