From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15334 invoked by alias); 20 Feb 2013 15:29:42 -0000 Received: (qmail 15014 invoked by uid 48); 20 Feb 2013 15:29:08 -0000 From: "burnus at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/56408] Fix dependency handling of testsuite/gfortran.dg Date: Wed, 20 Feb 2013 15:29:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: fortran X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: burnus at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg02084.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56408 --- Comment #5 from Tobias Burnus 2013-02-20 15:29:07 UTC --- (In reply to comment #4) > So can the modules be just moved into their own separate files and #included > (or INCLUDEd)? No. Those tests require that there is more than one translation unit. With "include" one has effectively one one TU. > Or add something like dg-additional-sources for module compilations, where > dg.exp would compile those files ahead of compiling the particular testcase, > and the testcase would contain dg-final cleanup lines for all those modules > (so every test would be self-contained). Well, that's essentially what is currently (with the patch), except that one runs into the "-o" issue. I think it should be also solvable with the current dg-additional-sources - either relying on having the ".s" in the current working directory (i.e. getting rid of the "-o".) -- Or by compiling separately for the dg-additional-sources (for "dg-do compile"). Probably, the former is not an option. Currently, it is handled as: proc gfortran_target_compile { source dest type options } { ... set options [dg-additional-files-options $options $source] return [target_compile $source $dest $type $options] } The "dg-additional-files-options" adds the additional sources to $options. Maybe, an option would be to do if { $type == "compile" } { set result [target_compile $source $dest $type $options] foreach srcfile $additional_sources { lappend result [target_compile $srcfile $dest $type $options] } return $result } Or something like that. (It probably needs some refinement as "dg-additional-files-options" also supports downloading etc. I am also not sure whether "foreach" properly splits the files in '{ dg-additional-sources "class_4b.f03 class_4c.f03" }', though it might do so.)