This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [PATCH, middle-end]: Fix PR50083: All 32-bit fortran tests fail on 32-bit Solaris


On Fri, Aug 26, 2011 at 9:05 AM, Richard Guenther <rguenther@suse.de> wrote:

>> As noted in the PR, we also have to protect conversion from
>> round->lround for non-TARGET_C99_FUNCTIONS targets. Otherwise, gcc
>> chokes in fold_fixed_mathfn, trying to canonicalize iround to
>> (non-existent) lround. It looks to me, that we can trigger the same
>> problem trying to convert (long long) round -> llround -> lround on
>> non-TARGET_C99_FUNCTIONS LP64 targets, so this fix probably applies to
>> other release branches as well.
>>
>> 2011-08-25 ?Uros Bizjak ?<ubizjak@gmail.com>
>>
>> ? ? ? PR middle-end/50083
>> ? ? ? * convert.c (convert_to_integer) <BUIT_IN_ROUND{,F,L}>: Convert
>> ? ? ? only when TARGET_C99_FUNCTIONS.
>> ? ? ? <BUILT_IN_NEARBYINT{,F,L}>: Ditto.
>> ? ? ? <BUILT_IN_RINT{,F,L}>: Ditto.
>>
>> Bootstrapped on x86_64-pc-linux-gnu, regtesting in progress.
>>
>> OK for SVN and 4.6?
>
> Hmm. ?In builtins.c we usually check if the target has support to
> expand the builtins directly in case we have named patterns for them.
> IMHO these convert.c optimizations belong somewhere else (so that
> they trigger for all languages). ?Somewhere else these days would
> be tree-ssa-forwprop.c.
>
> I'm not asking you to do this move but please consider also doing
> the optimization when the target can expand the function directly.

Yes, I know from our previous communication (ilogb handling) that this
whole convert.c part is fishy, but my attached patch fixes the
unwanted conversion in the same way as other similar builtins are
handled.

Uros.


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