diff mbox

Fix PR52297

Message ID alpine.LNX.2.00.1202291100420.18230@zhemvz.fhfr.qr
State New
Headers show

Commit Message

Richard Biener Feb. 29, 2012, 10:01 a.m. UTC
This fixes the LTO TM testcases by removing them.  TM testcases
belong in libitm testsuite (but dg-additional-sources does not
work there currently for some weird reasons, so I gave up
trying).

Committed.

Richard.

2012-02-29  Richard Guenther  <rguenther@suse.de>

	PR testsuite/52297
	* gcc.dg/lto/trans-mem-1_0.c: Remove.
	* gcc.dg/lto/trans-mem-1_1.c: Likewise.
	* gcc.dg/lto/trans-mem-2_0.c: Likewise.
	* gcc.dg/lto/trans-mem-2_1.c: Likewise.
	* gcc.dg/lto/trans-mem-4_0.c: Likewise.
	* gcc.dg/lto/trans-mem-4_1.c: Likewise.

Comments

Eric Botcazou Feb. 29, 2012, 10:10 a.m. UTC | #1
> 2012-02-29  Richard Guenther  <rguenther@suse.de>
>
> 	PR testsuite/52297
> 	* gcc.dg/lto/trans-mem-1_0.c: Remove.
> 	* gcc.dg/lto/trans-mem-1_1.c: Likewise.
> 	* gcc.dg/lto/trans-mem-2_0.c: Likewise.
> 	* gcc.dg/lto/trans-mem-2_1.c: Likewise.
> 	* gcc.dg/lto/trans-mem-4_0.c: Likewise.
> 	* gcc.dg/lto/trans-mem-4_1.c: Likewise.

You forgot to remove gcc.dg/lto/trans-mem.h itself.
Rainer Orth Feb. 29, 2012, 10:11 a.m. UTC | #2
Richard Guenther <rguenther@suse.de> writes:

> This fixes the LTO TM testcases by removing them.  TM testcases
> belong in libitm testsuite (but dg-additional-sources does not
> work there currently for some weird reasons, so I gave up
> trying).

Moving them to libitm/testsuite is an option, but that might be more
difficult for the LTO case.  I thought about adding
dg-require-effective-target tm_runtime (to check for working
-litm/libitm.spec) and dg-add-options tm_runtime to add the necessary
-B/-L/-I options (and eventually setting LD_LIBRARY_PATH for runtime
tests), but didn't yet get around to it.

	Rainer
Richard Biener Feb. 29, 2012, 10:14 a.m. UTC | #3
On Wed, 29 Feb 2012, Eric Botcazou wrote:

> > 2012-02-29  Richard Guenther  <rguenther@suse.de>
> >
> > 	PR testsuite/52297
> > 	* gcc.dg/lto/trans-mem-1_0.c: Remove.
> > 	* gcc.dg/lto/trans-mem-1_1.c: Likewise.
> > 	* gcc.dg/lto/trans-mem-2_0.c: Likewise.
> > 	* gcc.dg/lto/trans-mem-2_1.c: Likewise.
> > 	* gcc.dg/lto/trans-mem-4_0.c: Likewise.
> > 	* gcc.dg/lto/trans-mem-4_1.c: Likewise.
> 
> You forgot to remove gcc.dg/lto/trans-mem.h itself.

It's still used by the working trans-mem-3_[01].c testcase.

Richard.
Richard Biener Feb. 29, 2012, 10:14 a.m. UTC | #4
On Wed, 29 Feb 2012, Rainer Orth wrote:

> Richard Guenther <rguenther@suse.de> writes:
> 
> > This fixes the LTO TM testcases by removing them.  TM testcases
> > belong in libitm testsuite (but dg-additional-sources does not
> > work there currently for some weird reasons, so I gave up
> > trying).
> 
> Moving them to libitm/testsuite is an option, but that might be more
> difficult for the LTO case.  I thought about adding
> dg-require-effective-target tm_runtime (to check for working
> -litm/libitm.spec) and dg-add-options tm_runtime to add the necessary
> -B/-L/-I options (and eventually setting LD_LIBRARY_PATH for runtime
> tests), but didn't yet get around to it.

I'm not so sure.  All other target lib lto testcases are in the
respective target dir.

Richard.
Rainer Orth Feb. 29, 2012, 10:26 a.m. UTC | #5
Richard Guenther <rguenther@suse.de> writes:

>> Moving them to libitm/testsuite is an option, but that might be more
>> difficult for the LTO case.  I thought about adding
>> dg-require-effective-target tm_runtime (to check for working
>> -litm/libitm.spec) and dg-add-options tm_runtime to add the necessary
>> -B/-L/-I options (and eventually setting LD_LIBRARY_PATH for runtime
>> tests), but didn't yet get around to it.
>
> I'm not so sure.  All other target lib lto testcases are in the
> respective target dir.

Such as?  I can't find any use of lto.exp or -flto in lib*/testsuite.

	Rainer
Eric Botcazou Feb. 29, 2012, 10:26 a.m. UTC | #6
> It's still used by the working trans-mem-3_[01].c testcase.

That test is a little puzzling:

/* Test that we can build one object file with -fgnu-tm
   (trans-mem-3_1.c), but do the final link of all objects without
   -fgnu-tm.  */

So, in the end, we cannot do that without the trans-mem.h kludge?
Jakub Jelinek Feb. 29, 2012, 10:31 a.m. UTC | #7
On Wed, Feb 29, 2012 at 11:26:54AM +0100, Eric Botcazou wrote:
> > It's still used by the working trans-mem-3_[01].c testcase.
> 
> That test is a little puzzling:
> 
> /* Test that we can build one object file with -fgnu-tm
>    (trans-mem-3_1.c), but do the final link of all objects without
>    -fgnu-tm.  */
> 
> So, in the end, we cannot do that without the trans-mem.h kludge?

From what I understood, the trans-mem.h kludge is actually part of what
the tests were testing, one of the PRs was about trying to LTO together
implementation of some of libitm builtins together with some TM code.

	Jakub
Richard Biener Feb. 29, 2012, 10:36 a.m. UTC | #8
On Wed, 29 Feb 2012, Rainer Orth wrote:

> Richard Guenther <rguenther@suse.de> writes:
> 
> >> Moving them to libitm/testsuite is an option, but that might be more
> >> difficult for the LTO case.  I thought about adding
> >> dg-require-effective-target tm_runtime (to check for working
> >> -litm/libitm.spec) and dg-add-options tm_runtime to add the necessary
> >> -B/-L/-I options (and eventually setting LD_LIBRARY_PATH for runtime
> >> tests), but didn't yet get around to it.
> >
> > I'm not so sure.  All other target lib lto testcases are in the
> > respective target dir.
> 
> Such as?  I can't find any use of lto.exp or -flto in lib*/testsuite.

Hmm, I may indeed misremember (I thought of libgomp).  Definitely
some LTO testcases use dg-additional-sources, and for out-of LTO
harness LTO testcases we have the 'lto' effective target.

Richard.
diff mbox

Patch

Index: gcc/testsuite/gcc.dg/lto/trans-mem-2_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/trans-mem-2_0.c	(revision 184655)
+++ gcc/testsuite/gcc.dg/lto/trans-mem-2_0.c	(working copy)
@@ -1,16 +0,0 @@ 
-/* { dg-lto-options {{-flto -fgnu-tm}} } */
-/* { dg-lto-do link } */
-/* { dg-require-effective-target stdint_types } */
-/* { dg-require-effective-target fgnu_tm } */
-
-#include "trans-mem.h"
-
-extern void foobar() __attribute__((transaction_callable));
-
-main()
-{
-  __transaction_relaxed
-    {
-      foobar();
-    }
-}
Index: gcc/testsuite/gcc.dg/lto/trans-mem-4_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/trans-mem-4_0.c	(revision 184655)
+++ gcc/testsuite/gcc.dg/lto/trans-mem-4_0.c	(working copy)
@@ -1,13 +0,0 @@ 
-/* { dg-lto-options {{-flto -fgnu-tm}} } */
-/* { dg-lto-do link } */
-/* { dg-require-effective-target stdint_types } */
-/* { dg-require-effective-target fgnu_tm } */
-
-extern void foo() __attribute__((transaction_safe));
-
-int main()
-{
-  __transaction_atomic {
-      foo();
-  }
-}
Index: gcc/testsuite/gcc.dg/lto/trans-mem-2_1.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/trans-mem-2_1.c	(revision 184655)
+++ gcc/testsuite/gcc.dg/lto/trans-mem-2_1.c	(working copy)
@@ -1,4 +0,0 @@ 
-__attribute__((transaction_callable,noinline))
-void foobar() 
-{
-}
Index: gcc/testsuite/gcc.dg/lto/trans-mem-4_1.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/trans-mem-4_1.c	(revision 184655)
+++ gcc/testsuite/gcc.dg/lto/trans-mem-4_1.c	(working copy)
@@ -1,6 +0,0 @@ 
-#include "trans-mem.h"
-
-__attribute__((transaction_safe))
-void foo() 
-{
-}
Index: gcc/testsuite/gcc.dg/lto/trans-mem-1_0.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/trans-mem-1_0.c	(revision 184655)
+++ gcc/testsuite/gcc.dg/lto/trans-mem-1_0.c	(working copy)
@@ -1,14 +0,0 @@ 
-/* { dg-lto-options {{-flto -fgnu-tm}} } */
-/* { dg-lto-do link } */
-/* { dg-require-effective-target stdint_types } */
-/* { dg-require-effective-target fgnu_tm } */
-
-int i;
-
-main()
-{
-  __transaction_atomic
-    {
-      i = 0;
-    }
-}
Index: gcc/testsuite/gcc.dg/lto/trans-mem-1_1.c
===================================================================
--- gcc/testsuite/gcc.dg/lto/trans-mem-1_1.c	(revision 184655)
+++ gcc/testsuite/gcc.dg/lto/trans-mem-1_1.c	(working copy)
@@ -1 +0,0 @@ 
-#include "trans-mem.h"