This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Run one gcc test case multiple times with different option sets


On Fri, Apr 1, 2016 at 8:42 AM, Bill Seurer <seurer@linux.vnet.ibm.com> wrote:
> Is there some way using deja-gnu to have a single test case run multiple
> times using different sets of compiler options?  I didn't see anything in
> the documentation and didn't see any examples when I searched the existing
> test cases (though of course I wasn't exactly sure what to look for).

What most folks do is have two .c files; one that includes the other.

Thanks,
Andrew

>
> For example, something like this if I wanted to compile the test case once
> with -Dfoo and once with -Dbar.
>
> /* { dg-options "-Dfoo" } */
> /* { dg-options "-Dbar" } */
>
> That actually just uses the second set of options as-is.
>
> Thanks!
> --
>
> -Bill Seurer
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]