Commit 8d8e6b95 by Uros Bizjak Committed by Uros Bizjak

re PR middle-end/21282 (Converting floor into lfloor built-in function)

	PR middle-end/21282
	* convert.c (convert_to_integer): Convert ceil and floor in
	c99 mode only.

testsuite:

	PR middle-end/21282
	* gcc.dg/pr21282.c: New.

From-SVN: r99144
parent 90af9146
2005-05-03 Uros Bizjak <uros@kss-loka.si>
PR middle-end/21282
* convert.c (convert_to_integer): Convert ceil and floor in
c99 mode only.
2005-04-29 Geoffrey Keating <geoffk@apple.com>
PR target/20813
......
......@@ -349,26 +349,20 @@ convert_to_integer (tree type, tree expr)
switch (fcode)
{
case BUILT_IN_CEILF:
case BUILT_IN_CEILL:
case BUILT_IN_CEIL: case BUILT_IN_CEILF: case BUILT_IN_CEILL:
/* Only convert in ISO C99 mode. */
if (!TARGET_C99_FUNCTIONS)
break;
/* ... Fall through ... */
case BUILT_IN_CEIL:
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (long_long_integer_type_node))
fn = mathfn_built_in (s_intype, BUILT_IN_LLCEIL);
else
fn = mathfn_built_in (s_intype, BUILT_IN_LCEIL);
break;
case BUILT_IN_FLOORF:
case BUILT_IN_FLOORL:
case BUILT_IN_FLOOR: case BUILT_IN_FLOORF: case BUILT_IN_FLOORL:
/* Only convert in ISO C99 mode. */
if (!TARGET_C99_FUNCTIONS)
break;
/* ... Fall through ... */
case BUILT_IN_FLOOR:
if (TYPE_MAIN_VARIANT (type) == TYPE_MAIN_VARIANT (long_long_integer_type_node))
fn = mathfn_built_in (s_intype, BUILT_IN_LLFLOOR);
else
......
2005-05-03 Uros Bizjak <uros@kss-loka.si>
PR middle-end/21282
* gcc.dg/pr21282.c: New.
2005-05-03 David Billinghurst <David.Billinghurst@riotinto.com>
* gcc.dg/vect/pr20122.c: Clean up .vect file.
......
/* { dg-do compile } */
/* { dg-options "-O1" } */
extern double floor (double);
long foo (float f)
{
return (long) floor (f);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment