This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [testsuite] Adding target nonpic to g++.dg/tm/pr47746.C
- From: Patrick Marlier <patrick dot marlier at gmail dot com>
- To: Alexander Ivchenko <aivchenk at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Aldy Hernandez <aldyh at redhat dot com>, Richard Henderson <rth at redhat dot com>
- Date: Thu, 18 Apr 2013 14:21:14 +0200
- Subject: Re: [testsuite] Adding target nonpic to g++.dg/tm/pr47746.C
- References: <CACysShhtPuPUsE7ea1QR8R0yihecZgetnec4SnwQ+jL1sY9+Tg at mail dot gmail dot com> <CAKQMxzSCrzo4UFNri0gq3MfCApCvMbyRrYQZih1SJ9FAGDk0Qg at mail dot gmail dot com> <CACysShjvgA_OmY0j_MAZ-RMjHjHxs9Gv2JW1XErK6VuCpB0dbw at mail dot gmail dot com>
Hi Alexander,
On Thu, Apr 18, 2013 at 12:49 PM, Alexander Ivchenko <aivchenk@gmail.com> wrote:
> I'm trying it on linux/x86_64 on trunk. Testing just by adding -fpic
> to the dg-options:
>
> --- a/gcc/testsuite/g++.dg/tm/pr47746.C
> +++ b/gcc/testsuite/g++.dg/tm/pr47746.C
> @@ -1,5 +1,5 @@
> // { dg-do compile }
> -// { dg-options "-fgnu-tm" }
> +// { dg-options "-fgnu-tm -fpic" }
>
> Here is the error msg:
>
> testsuite/g++.dg/tm/pr47746.C:20:14: error: unsafe function call 'void
> Building::load(InputStream*)' within 'transaction_safe' function
Thanks! Now I understand the error (and I am able to reproduce it). :)
> 4462| know what it will contain at runtime. */
> 4463| if (cgraph_function_body_availability (node) < AVAIL_AVAILABLE)
> 4464+> return true;
> 4465|
>
> (gdb) p cgraph_function_body_availability (node)
> $54 = AVAIL_OVERWRITABLE
>
> Sure I can file a PR If you think that the test was not supposed to
> fail with -fpic
I think your patch is OK but I cannot approve it since I am not a maintainer.
I CCed Richard since he is the one who can approve and knows the TM
implementation.
Thanks,
--
Patrick