This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fix ICEs on ODR violating programs and improve ODR mismatch diagnostic
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 23 Mar 2015 16:30:27 +0100
- Subject: Re: Fix ICEs on ODR violating programs and improve ODR mismatch diagnostic
- Authentication-results: sourceware.org; auth=none
- References: <20150322221123 dot GA26896 at kam dot mff dot cuni dot cz> <20150323145917 dot GV1746 at tucnak dot redhat dot com> <CAFiYyc3+VU0exd_UCPPN8T9TDf7GWQUKNAJ0AxwXvZY6ER9Nhw at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Mon, Mar 23, 2015 at 04:07:10PM +0100, Richard Biener wrote:
> On Mon, Mar 23, 2015 at 3:59 PM, Jakub Jelinek <jakub@redhat.com> wrote:
> > On Sun, Mar 22, 2015 at 11:11:24PM +0100, Jan Hubicka wrote:
> >> --- testsuite/g++.dg/lto/pr65475b_0.C (revision 0)
> >> +++ testsuite/g++.dg/lto/pr65475b_0.C (revision 0)
> >> @@ -0,0 +1,9 @@
> >> +/* { dg-lto-do link } */
> >> +/* { dg-options "-O2 -Wno-odr" } */
> >
> > Wasn't this supposed to be dg-lto-options instead?
> > I'm getting
> > WARNING: lto.exp does not support dg-options in primary source file
> > otherwise.
>
> Yep - dg-options works in secondary files only (and applies to compile-time).
Here is a fix then. Both
WARNING: lto.exp does not support dg-options in primary source file
messages go away with it. Ok for trunk?
2015-03-23 Jakub Jelinek <jakub@redhat.com>
PR ipa/65475
* g++.dg/lto/pr65475_0.C: Use dg-lto-options instead of
dg-options.
* g++.dg/lto/pr65475b_0.C: Likewise.
--- gcc/testsuite/g++.dg/lto/pr65475_0.C.jj 2015-03-23 08:47:52.000000000 +0100
+++ gcc/testsuite/g++.dg/lto/pr65475_0.C 2015-03-23 16:24:36.024316627 +0100
@@ -1,5 +1,5 @@
/* { dg-lto-do link } */
-/* { dg-options "-O2 -Wno-odr" } */
+/* { dg-lto-options "-O2 -Wno-odr" } */
/* { dg-extra-ld-options { -O2 -Wno-odr -r -nostdlib } } */
namespace std {
class ios_base {
@@ -7,4 +7,3 @@ class ios_base {
class __attribute((__abi_tag__("cxx11"))) failure : A {};
} a;
}
-
--- gcc/testsuite/g++.dg/lto/pr65475b_0.C.jj 2015-03-23 08:47:52.432180556 +0100
+++ gcc/testsuite/g++.dg/lto/pr65475b_0.C 2015-03-23 16:21:44.524084847 +0100
@@ -1,5 +1,5 @@
/* { dg-lto-do link } */
-/* { dg-options "-O2 -Wno-odr" } */
+/* { dg-lto-options "-O2 -Wno-odr" } */
/* { dg-extra-ld-options { -O2 -Wno-odr -r -nostdlib } } */
namespace std {
class exception {};
Jakub