public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug testsuite/65126] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
@ 2015-02-19 23:31 ` vries at gcc dot gnu.org
  2015-02-20  7:45 ` [Bug testsuite/65126] [5 Regresion] " rguenth at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2015-02-19 23:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

--- Comment #1 from vries at gcc dot gnu.org ---
Presumably same thing happens for pr47218.C, which saves temps:
...
/* { dg-options "-save-temps" } */
...

And cleans them up:
...
// { dg-final { cleanup-saved-temps } 
...

but also has additional sources:
...
/* { dg-additional-sources "pr47218-1.C" } */
...

Of which the temps are not cleaned up:
...
pr47218-1.o pr47218-1.ii pr47218-1.s
...


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final
@ 2015-02-19 23:31 vries at gcc dot gnu.org
  2015-02-19 23:31 ` [Bug testsuite/65126] " vries at gcc dot gnu.org
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2015-02-19 23:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

            Bug ID: 65126
           Summary: additional_sources not defined anymore during dg-final
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: testsuite
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org

[ Reported before as PR65116. That one got hijacked for an unrelated problem. ]

When running vect-simd-clone-10.c, a file vect-simd-clone-10a.c.126t.vect is
left in the test directory.

The testcase lists vect-simd-clone-10a.c as addditional source:
...
/* { dg-additional-sources vect-simd-clone-10a.c } */
...

Then the test-case cleans up the respective tree-dump:
...
/* { dg-final { cleanup-tree-dump "vect" } } */
...

The cleanup-tree-dump calls cleanup-dump, which intends to take
additional_sources into account.

However, the global additional_sources declaration is missing, so the exists
additional_sources will always return false.

And if we add the global additional_sources declaration, it still fails,
because additional_sources is empty. It has been reset by
dg-additional-files-options, which is called by gcc_target_compile, which is
called by gcc-dg-test-1, which is called by gcc-dg-test, which is called by
dg-test as ${tool}-dg-test.

dg-test does the the dg-final-code processing after the ${tool}-dg-test so at
that point additional_sources is empty.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] [5 Regresion] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
  2015-02-19 23:31 ` [Bug testsuite/65126] " vries at gcc dot gnu.org
@ 2015-02-20  7:45 ` rguenth at gcc dot gnu.org
  2015-02-20  7:56 ` mkuvyrkov at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-02-20  7:45 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2015-02-20
   Target Milestone|---                         |5.0
            Summary|additional_sources not      |[5 Regresion]
                   |defined anymore during      |additional_sources not
                   |dg-final                    |defined anymore during
                   |                            |dg-final
     Ever confirmed|0                           |1

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Confirmed.  This is also a regression I think.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] [5 Regresion] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
  2015-02-19 23:31 ` [Bug testsuite/65126] " vries at gcc dot gnu.org
  2015-02-20  7:45 ` [Bug testsuite/65126] [5 Regresion] " rguenth at gcc dot gnu.org
@ 2015-02-20  7:56 ` mkuvyrkov at gcc dot gnu.org
  2015-02-20  8:32 ` vries at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mkuvyrkov at gcc dot gnu.org @ 2015-02-20  7:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

--- Comment #3 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> ---
Hi Tom,

I can't reproduce this.  I'm trying "make check-gcc RUNTESTFLAGS="vect.exp"" on
a native x86_64 bootstrap.

What is required to trigger this?

[FWIW, I see that code handling additional_source has different paths for
remote vs local testing, so it might be triggered only with remote testing.]


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] [5 Regresion] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-02-20  7:56 ` mkuvyrkov at gcc dot gnu.org
@ 2015-02-20  8:32 ` vries at gcc dot gnu.org
  2015-02-20  9:57 ` mkuvyrkov at gcc dot gnu.org
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2015-02-20  8:32 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

--- Comment #4 from vries at gcc dot gnu.org ---
(In reply to Maxim Kuvyrkov from comment #3)
> Hi Tom,
> 
> I can't reproduce this.  I'm trying "make check-gcc RUNTESTFLAGS="vect.exp""
> on a native x86_64 bootstrap.
> 
> What is required to trigger this?
>

Hi Maxim,

vect.exp=vect-simd-clone-10.c should trigger this.

Running vect-simd-clone-10.c produces the leftover
vect-simd-clone-10a.c.126t.vect.

But if vect-simd-clone-10a.c is run afterwards, then
vect-simd-clone-10a.c.126t.vect is first overwritten, and then cleaned up.

So whether the file is still there after the test run depends on whether 10a is
run after 10 in the same testdirectory.


Reproduced it with a fresh build from r220825:
...
$ make -k -j5 check RUNTESTFLAGS=vect.exp=vect-simd-clone-10.c
--target_board=unix

  ...

$ ls lean/build/gcc/testsuite/gcc*
lean/build/gcc/testsuite/gcc:
gcc.log  gcc.log.sep  gcc.sum  gcc.sum.sep  site.exp

lean/build/gcc/testsuite/gcc1:
gcc.log.sep  gcc.sum.sep  site.exp  vect-simd-clone-10a.c.126t.vect

lean/build/gcc/testsuite/gcc2:
gcc.log.sep  gcc.sum.sep  site.exp

lean/build/gcc/testsuite/gcc3:
gcc.log.sep  gcc.sum.sep  site.exp
...


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] [5 Regresion] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2015-02-20  8:32 ` vries at gcc dot gnu.org
@ 2015-02-20  9:57 ` mkuvyrkov at gcc dot gnu.org
  2015-02-22 14:47 ` vries at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: mkuvyrkov at gcc dot gnu.org @ 2015-02-20  9:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |mkuvyrkov at gcc dot gnu.org

--- Comment #5 from Maxim Kuvyrkov <mkuvyrkov at gcc dot gnu.org> ---
The problem here is that gcc_target_compile (and, probably, other
*_target_compile procs) clears out additional_sources as soon as it is done.

I don't immediately know how to fix this properly.  A quick fix may be to delay
clearing out additional_sources till a later point.

More generally, from what I see GCC's testsuite doesn't have coordinated
maintenance of its global state (additional_* and other variables, see
gcc-dg.exp).  It would be a nice cleanup to have PUSH and POP operations for
global state that could used to 

1. clearing of state for next test
  -- the POP to a reference clean state would be done once all parts of the
test would finish, thus removing the need to clear out additional_sources after
compilation (== midway through running the test).

2. saving / restoring of state for target-supports checks.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] [5 Regresion] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2015-02-20  9:57 ` mkuvyrkov at gcc dot gnu.org
@ 2015-02-22 14:47 ` vries at gcc dot gnu.org
  2015-02-22 15:17 ` [Bug testsuite/65126] [5 Regression] " vries at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2015-02-22 14:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

--- Comment #6 from vries at gcc dot gnu.org ---
Created attachment 34835
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=34835&action=edit
Tentative patch

works for vect-simd-clone-10.c


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] [5 Regression] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2015-02-22 14:47 ` vries at gcc dot gnu.org
@ 2015-02-22 15:17 ` vries at gcc dot gnu.org
  2015-02-23  8:42 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2015-02-22 15:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[5 Regresion]               |[5 Regression]
                   |additional_sources not      |additional_sources not
                   |defined anymore during      |defined anymore during
                   |dg-final                    |dg-final

--- Comment #7 from vries at gcc dot gnu.org ---
fix Regression typo


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] [5 Regression] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2015-02-22 15:17 ` [Bug testsuite/65126] [5 Regression] " vries at gcc dot gnu.org
@ 2015-02-23  8:42 ` vries at gcc dot gnu.org
  2015-02-24  8:21 ` vries at gcc dot gnu.org
  2015-02-24  8:33 ` vries at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2015-02-23  8:42 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #8 from vries at gcc dot gnu.org ---
https://gcc.gnu.org/ml/gcc-patches/2015-02/msg01350.html


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] [5 Regression] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2015-02-23  8:42 ` vries at gcc dot gnu.org
@ 2015-02-24  8:21 ` vries at gcc dot gnu.org
  2015-02-24  8:33 ` vries at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2015-02-24  8:21 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

--- Comment #9 from vries at gcc dot gnu.org ---
Author: vries
Date: Tue Feb 24 06:55:51 2015
New Revision: 220929

URL: https://gcc.gnu.org/viewcvs?rev=220929&root=gcc&view=rev
Log:
Add additional_sources_used

2015-02-24  Tom de Vries  <tom@codesourcery.com>

    PR testsuite/65126
    * lib/gcc-defs.exp (additional_sources_used): Add new var.
    (dg-additional-files-options): Copy additional_sources to
    additional_sources_used before emptying additional_sources.
    * lib/gcc-dg.exp (cleanup-coverage-files, cleanup-repo-files)
    (cleanup-stack-usage, cleanup-ada-spec, cleanup-dump)
    (cleanup-saved-temps): Use additional_sources_used instead of
    additional_sources.
    (dg-test): Reset additional_sources_used.

Modified:
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/testsuite/lib/gcc-defs.exp
    trunk/gcc/testsuite/lib/gcc-dg.exp


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug testsuite/65126] [5 Regression] additional_sources not defined anymore during dg-final
  2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
                   ` (8 preceding siblings ...)
  2015-02-24  8:21 ` vries at gcc dot gnu.org
@ 2015-02-24  8:33 ` vries at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: vries at gcc dot gnu.org @ 2015-02-24  8:33 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65126

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #10 from vries at gcc dot gnu.org ---
Marking resolved, fixed


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-02-24  7:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-19 23:31 [Bug testsuite/65126] New: additional_sources not defined anymore during dg-final vries at gcc dot gnu.org
2015-02-19 23:31 ` [Bug testsuite/65126] " vries at gcc dot gnu.org
2015-02-20  7:45 ` [Bug testsuite/65126] [5 Regresion] " rguenth at gcc dot gnu.org
2015-02-20  7:56 ` mkuvyrkov at gcc dot gnu.org
2015-02-20  8:32 ` vries at gcc dot gnu.org
2015-02-20  9:57 ` mkuvyrkov at gcc dot gnu.org
2015-02-22 14:47 ` vries at gcc dot gnu.org
2015-02-22 15:17 ` [Bug testsuite/65126] [5 Regression] " vries at gcc dot gnu.org
2015-02-23  8:42 ` vries at gcc dot gnu.org
2015-02-24  8:21 ` vries at gcc dot gnu.org
2015-02-24  8:33 ` vries at gcc dot gnu.org

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).