Re: Some __builtin_round and cast subtleties

2014-07-21 Thread Joseph S. Myers
On Fri, 4 Jul 2014, Kyrill Tkachov wrote: > These end up taking different codepaths through the compiler () because > __builtin_lround has to take -fmath-errno into account and does not end up > getting inlined (generating a call to the library lround). That suggests this transformation is buggy

Some __builtin_round and cast subtleties

2014-07-04 Thread Kyrill Tkachov
Hi all, Consider code: long int foo (double a) { return __builtin_round (a); } Compiling for aarch64-none-elf (bare-metal aarch64 with newlib as C-library) with -O2 gives the 003t.original dump: ;; Function foo (null) ;; enabled by -tree-original { return (long int) __builtin_round (a)