From 80d99aa20cd0e8fa519c3fe1e4e7402931dfa4cb Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Mon, 1 Dec 2014 08:20:55 +0100 Subject: libtests/complex,math: Prevent optimizations For constant arguments GCC calculates the values of the math library functions at compile-time. close #1741 --- testsuites/libtests/complex/docomplex.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'testsuites/libtests/complex/docomplex.h') diff --git a/testsuites/libtests/complex/docomplex.h b/testsuites/libtests/complex/docomplex.h index 96ce9eb1a9..c844cc0906 100644 --- a/testsuites/libtests/complex/docomplex.h +++ b/testsuites/libtests/complex/docomplex.h @@ -25,11 +25,13 @@ extern void FUNC(docomplex) (void); +volatile complex FTYPE ca, cb; + void FUNC(docomplex) (void) { #ifndef PROVIDE_EMPTY_FUNC - complex FTYPE ca, cb, cc; + complex FTYPE cc; FTYPE f1; ca = 1.0 + 1.0 * I; -- cgit v1.2.3