Bug 38062 - FAIL: gfortran.dg/include_2.f90 -O (test for excess errors): error: stray '#' in program
Summary: FAIL: gfortran.dg/include_2.f90 -O (test for excess errors): error: stray '...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-08 22:31 UTC by John David Anglin
Modified: 2008-12-14 22:32 UTC (History)
1 user (show)

See Also:
Host: hppa1.1-hp-hpux10.20
Target: hppa1.1-hp-hpux10.20
Build: hppa1.1-hp-hpux10.20
Known to work:
Known to fail:
Last reconfirmed:


Attachments
pr38062.log (1.76 KB, text/plain)
2008-12-13 17:47 UTC, dave
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2008-11-08 22:31:52 UTC
Executing on host: /xxx/gnu/gcc/objdir/gcc/testsuite/gfortran/../../gfortran -B/
xxx/gnu/gcc/objdir/gcc/testsuite/gfortran/../../ /xxx/gnu/gcc/gcc/gcc/testsuite/
gfortran.dg/include_2.f90   -O  -fpreprocessed -g3  -L/xxx/gnu/gcc/objdir/hppa1.1-hp-hpux10.20/./libgfortran/.libs -L/xxx/gnu/gcc/objdir/hppa1.1-hp-hpux10.20/./
libgfortran/.libs -L/xxx/gnu/gcc/objdir/hppa1.1-hp-hpux10.20/./libiberty  -lm   
-o include_2.exe    (timeout = 600)
/var/tmp//ccK9X5C1.c:1: error: stray '#' in program
/var/tmp//ccK9X5C1.c:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__cplusplus'
/var/tmp//ccK9X5C1.c:3: error: stray '#' in program
/var/tmp//ccK9X5C1.c:29: error: stray '#' in program
/var/tmp//ccK9X5C1.c:31: error: stray '#' in program/var/tmp//ccK9X5C1.c:31: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of inputcollect2: gcc returned 1 exit status
Comment 1 Mikael Morin 2008-12-08 22:51:37 UTC
Does it still happen?
If so, can you provide more information (host, version, configure options)?
Comment 2 dave 2008-12-08 23:17:45 UTC
Subject: Re:  FAIL: gfortran.dg/include_2.f90  -O  (test for excess errors): error: stray '#' in program

> Does it still happen?

Not sure.  It takes a long time to do a full build on the this machine.

The test didn't fail in my last build on head.  Was there a recent backport
that might have fixed this PR?

> If so, can you provide more information (host, version, configure options)?

../gcc/configure --with-gnu-as --with-as=/usr/local/bin/as --enable-shared --prefix=/opt/gnu/gcc/gcc-4.3.2 --with-gmp=/opt/gnu/gcc/gcc-4.3.2 --enable-debug=no --disable-nls --enable-checking=release --enable-languages="c,c++,objc,fortran,ada,obj-c++"

The rest of the info is already in the PR (host, target, build).

Is there a way to capture the generated .c file?

Dave
Comment 3 Mikael Morin 2008-12-09 00:50:07 UTC
(In reply to comment #2)
> The test didn't fail in my last build on head.  Was there a recent backport
> that might have fixed this PR?
Not really, I was having a look at forgotten PRs

> 
> > If so, can you provide more information (host, version, configure options)?
> 
> ../gcc/configure --with-gnu-as --with-as=/usr/local/bin/as --enable-shared
> --prefix=/opt/gnu/gcc/gcc-4.3.2 --with-gmp=/opt/gnu/gcc/gcc-4.3.2
> --enable-debug=no --disable-nls --enable-checking=release
> --enable-languages="c,c++,objc,fortran,ada,obj-c++"
> 
> The rest of the info is already in the PR (host, target, build).
Yes, sorry.

> 
> Is there a way to capture the generated .c file?
I'm not sure there should be a .c generated file here.

Can you compile the file with your host fortran compiler? With the bootstrapped f951?
(For me, both work with the -g3 option)
Comment 4 dave 2008-12-13 17:47:20 UTC
Subject: Re:  FAIL: gfortran.dg/include_2.f90  -O  (test
	for excess errors): error: stray '#' in program

On Tue, 09 Dec 2008, mikael at gcc dot gnu dot org wrote:

> > Is there a way to capture the generated .c file?
> I'm not sure there should be a .c generated file here.

The .c file is generated by collect2.  There's a problem compiling it
using the fortran driver.  Attached log of compiler output with
"-v -Wl,-debug".

I vaguely recall that a fix was applied for this on the trunk.  I'll
see if I can find it.

Dave
Comment 5 dave 2008-12-13 17:47:20 UTC
Created attachment 16903 [details]
pr38062.log
Comment 6 John David Anglin 2008-12-13 17:51:53 UTC
Need to backport change from PR 35665.
Comment 7 John David Anglin 2008-12-14 22:31:54 UTC
Subject: Bug 38062

Author: danglin
Date: Sun Dec 14 22:30:32 2008
New Revision: 142755

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142755
Log:
	PR target/38062
	Backport from mainline:
	2008-04-08  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	* collect2.c (write_c_file): Don't wrap in "#ifdef __cplusplus".


Modified:
    branches/gcc-4_3-branch/gcc/ChangeLog
    branches/gcc-4_3-branch/gcc/collect2.c

Comment 8 John David Anglin 2008-12-14 22:32:18 UTC
Fixed.