On Tue, 15 Oct 2013, Mike Stump wrote:

> On Oct 15, 2013, at 12:45 AM, Richard Biener <rguent...@suse.de> wrote:
> > On Mon, 14 Oct 2013, Mike Stump wrote:
> >> On Sep 25, 2012, at 8:00 AM, Richard Guenther <rguent...@suse.de> wrote:
> >>> 2012-09-25  Richard Guenther  <rguent...@suse.de>
> >>> 
> >>>   PR lto/54625
> >>>   * lto-symtab.c (lto_symtab_merge_cgraph_nodes_1): Do not merge
> >>>   cgraph nodes for builtins.
> >>> 
> >>>   * gcc.dg/lto/pr54702_0.c: New testcase.
> >>>   * gcc.dg/lto/pr54702_1.c: Likewise.
> >>>   * gcc.dg/lto/pr54625-1_0.c: Likewise.
> >>>   * gcc.dg/lto/pr54625-1_1.C: Likewise.
> >>>   * gcc.dg/lto/pr54625-2_0.c: Likewise.
> >>>   * gcc.dg/lto/pr54625-2_1.C: Likewise.
> >> 
> >> 
> >> xgcc: error: /home/mrs/wg/gcc/gcc/testsuite/gcc.dg/lto/pr54625-2_1.C: C++ 
> >> compiler not installed on this system
> >> 
> >> FAIL: gcc.dg/lto/pr54625-2 c_lto_pr54625-2_1.o assemble, -O2 -flto 
> >> -fuse-linker-plugin
> >> 
> >> shouldn't C++ testcases go into the C++ testsuite?
> > 
> > Well ... this is a mixed C / C++ testcase (see the other file 
> > participating, gcc.dg/lto/pr54625-2_0.c).  The C testsuite is the only
> > one where the driver switches languages based on the file ending.
> 
> That is an interesting inquiry, but, doesn't lead to the error.  Not sure 
> exactly why you bring it up:
> 
> From a random C++ test suite run:
> 
> spawn /home/mrs/work2/gcc-port/gcc/xgcc -B/home/mrs/work2/gcc-port/gcc/ 
> -fno-diagnostics-show-caret -O0 -flto -flto-partition=none 
> -fuse-linker-plugin -DNO_TRAMPOLINES -c -DNO_TRAMPOLINES -o 
> cp_lto_20100603-1_1.o 
> /home/mrs/work2/gcc/gcc/testsuite/g++.dg/lto/20100603-1_1.c
> 
> here, we see that xgcc is used to build a C part of a mix language testcase 
> in the C++ test suite.
> 
> If you follow that style, is there some reason why it won't just work as you 
> want?
> 
> > Hmm, it seems at least the fortran frontend knows how to mix fortran
> > and C.
> 
> And the fortran/c test cases are in the fortran test suite.
> 
> > So if you really did not build the C++ compiler then we need,
> 
> Yup, no C++ compiler.
> 
> > at least for lto.exp, a way to say dg-require-c++-frontend in the main file
> > (thats the _0 one).
> 
> Why do that?
> 
> > Btw, can we end up with the C frontend not built?
> 
> I'v never contemplated that idea?  but no, c is automatically added in order 
> I suppose, to build the language independent runtime (libgcc) with.

I suppose it's fine to move the testcase to the C++ lto testsuite
if you verify it will use the C compiler for the C parts.

Thanks,
Richard.

Reply via email to