From: Richard Guenther <richard.guenther@gmail.com>
To: Andreas Schwab <schwab@linux-m68k.org>
Cc: gcc-patches@gcc.gnu.org, java-patches@gcc.gnu.org,
Joseph Myers <joseph@codesourcery.com>
Subject: Re: Fix flag_trapping_math in java frontend
Date: Mon, 23 Jan 2012 10:59:00 -0000 [thread overview]
Message-ID: <CAFiYyc189sk8RCjoPLc15B=MAx_nw-SXjoFuHWPT_esS-6t6fw@mail.gmail.com> (raw)
In-Reply-To: <m2sjj7bxhq.fsf@igel.home>
On Sun, Jan 22, 2012 at 3:52 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> The java frontend wants that floating point operations are assumed to
> never trap, thus clears flag_trapping_math in java_init_options_struct.
> But this is no longer effective after revision 165823, because
> set_fast_math_flags is now always called during option processing,
> overriding anything what the frontend did to flag_trapping_math. This
> is an amendment to revision 169930 which introduced
> frontend_set_flag_trapping_math, but didn't set it in
> java_init_options_struct.
>
> While this was found during examination of PR49847, this doesn't fix it,
> but only makes the bug dormant again in 4.6.
>
> Tested on powerpc-linux, ok for trunk and 4.6 branch?
Ok.
Thanks,
Richard.
> Andreas.
>
> 2012-01-22 Andreas Schwab <schwab@linux-m68k.org>
>
> * lang.c (java_init_options_struct): Set
> frontend_set_flag_trapping_math.
>
> diff --git a/gcc/java/lang.c b/gcc/java/lang.c
> index ccab48c..da7dd05 100644
> --- a/gcc/java/lang.c
> +++ b/gcc/java/lang.c
> @@ -1,6 +1,6 @@
> /* Java(TM) language-specific utility routines.
> Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
> - 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
> + 2005, 2006, 2007, 2008, 2010, 2012 Free Software Foundation, Inc.
>
> This file is part of GCC.
>
> @@ -550,6 +550,7 @@ java_init_options_struct (struct gcc_options *opts)
>
> /* In Java floating point operations never trap. */
> opts->x_flag_trapping_math = 0;
> + opts->frontend_set_flag_trapping_math = true;
>
> /* In Java arithmetic overflow always wraps around. */
> opts->x_flag_wrapv = 1;
> --
> 1.7.8.4
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."
prev parent reply other threads:[~2012-01-23 10:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-22 14:52 Andreas Schwab
2012-01-22 16:03 ` Andrew Haley
2012-01-22 23:07 ` Mikael Pettersson
2012-01-23 10:59 ` Richard Guenther [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFiYyc189sk8RCjoPLc15B=MAx_nw-SXjoFuHWPT_esS-6t6fw@mail.gmail.com' \
--to=richard.guenther@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=java-patches@gcc.gnu.org \
--cc=joseph@codesourcery.com \
--cc=schwab@linux-m68k.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).