Bug 55884 - [4.8 Regression] FAIL: libgomp.fortran/omp_parse3.f90 -O0 (test for excess errors)
Summary: [4.8 Regression] FAIL: libgomp.fortran/omp_parse3.f90 -O0 (test for excess ...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: driver (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: 4.8.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-05 16:29 UTC by John David Anglin
Modified: 2013-01-16 16:35 UTC (History)
2 users (show)

See Also:
Host: hppa2.0w-hp-hpux11.11
Target: hppa2.0w-hp-hpux11.11
Build: hppa2.0w-hp-hpux11.11
Known to work:
Known to fail:
Last reconfirmed:


Attachments
omp_parse3 compile log with -v -Wl,-debug (3.18 KB, text/plain)
2013-01-05 16:29 UTC, John David Anglin
Details
libgomp.log.gz (45.30 KB, application/x-gzip)
2013-01-09 04:16 UTC, dave.anglin
Details
patch-55884.d.txt (661 bytes, text/plain)
2013-01-13 21:27 UTC, dave.anglin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2013-01-05 16:29:45 UTC
Created attachment 29087 [details]
omp_parse3 compile log with -v -Wl,-debug

spawn /test/gnu/gcc/objdir/gcc/xgcc -B/test/gnu/gcc/objdir/gcc/ /test/gnu/gcc/gcc/libgomp/testsuite/libgomp.fortran/omp_parse3.f90 -B/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/ -B/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/.libs -I/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp -I/test/gnu/gcc/gcc/libgomp/testsuite/.. -fmessage-length=0 -fno-diagnostics-show-caret -fopenmp -fintrinsic-modules-path /test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp -B/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/../libquadmath/.libs/ -O0 -B/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/../libgfortran/.libs -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/.libs -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/../libquadmath/.libs/ -L/test/gnu/gcc/objdir/hppa
2.0w-hp-hpux11.11/./libgomp/../libgfortran/.libs -lgfortran -lm -o ./omp_parse3.
exe
xgcc: fatal error: cannot specify -o with -c, -S or -E with multiple files
compilation terminated.
collect2: error: gcc returned 1 exit status
compiler exited with status 1

With -v:

 /test/gnu/gcc/objdir/gcc/collect2 -z -u main -u __gcc_plt_call -o ./omp_parse3.exe /usr/ccs/lib/crt0.o /lib/unix98.o -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/.libs -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/../libquadmath/.libs/ -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/../libgfortran/.libs -L/test/gnu/gcc/objdir/gcc -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/.libs -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libquadmath/.libs -L/test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgfortran/.libs -L/usr/ccs/lib -L/opt/langtools/lib omp_parse3.o -lgfortran -lm -lgomp -lgcc -lgcc_eh -lrt -lpthread -lc -lgcc -lgcc_eh -lgcc_stub
xgcc: fatal error: cannot specify -o with -c, -S or -E with multiple files
compilation terminated.

With -Wl,-debug:

/test/gnu/gcc/objdir/gcc/xgcc -x c -c -o /var/tmp//ccGz9WOJ.o -B /test/gnu/gcc/objdir/gcc/ -B /test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/ -B /test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/.libs -fmessage-length=0 -fno-diagnostics-show-caret -fopenmp -fintrinsic-modules-path -B /test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/../libquadmath/.libs/ -B /test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp/../libgfortran/.libs -fno-profile-arcs -fno-test-coverage -fno-branch-probabilities -fno-exceptions -w -fno-whole-program /var/tmp//ccRV7Hds.c
xgcc: fatal error: cannot specify -o with -c, -S or -E with multiple files
compilation terminated.
collect2: error: gcc returned 1 exit status
ÄLeaving /var/tmp//ccRV7Hds.cÅ
ÄLeaving /var/tmp//ccGz9WOJ.oÅ
ÄLeaving /var/tmp//ccfn45y1.ldÅ
ÄLeaving /var/tmp//ccimnM3j.leÅ
ÄLeaving ./omp_parse3.exeÅ
Comment 1 John David Anglin 2013-01-05 16:37:02 UTC
Revision 194745 was OK.
Comment 2 John David Anglin 2013-01-05 18:59:12 UTC
(In reply to comment #1)
> Revision 194745 was OK.

Correction: 194549 was OK.
Comment 3 Jakub Jelinek 2013-01-07 12:50:56 UTC
Guess related to -fintrinsic-module-path.
In some spots it still has the right argument:
-fintrinsic-modules-path /test/gnu/gcc/objdir/hppa2.0w-hp-hpux11.11/./libgomp
but in other spots that argument is gone:
-fintrinsic-modules-path -B ...
thus -B is taken as -fintrinsic-modules-path argument and the original -B argument is considered another source file.

Can you try perhaps:
--- libgomp/testsuite/libgomp.fortran/fortran.exp	2012-12-20 11:38:48.663282599 +0100
+++ libgomp/testsuite/libgomp.fortran/fortran.exp	2013-01-07 13:45:51.557361907 +0100
@@ -14,7 +14,7 @@ set quadmath_library_path "../libquadmat
 dg-init
 
 if { $blddir != "" } {
-    lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path ${blddir}"
+    lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path${blddir}"
     # Look for a static libgfortran first.
     if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
         set lang_test_file "${lang_library_path}/libgfortran.a"

?  Though, I'd say using Joined Separate for such named option is just wrong, it is fine for single letter options like -B, -A, -D, -U etc., but for options of this kind I think it would be much better if it was
fintrinsic-modules-path
Fortran RejectNegative Separate
Specify where to find the compiled intrinsic modules

fintrinsic-modules-path=
Fortran RejectNegative Joined
Specify where to find the compiled intrinsic modules

instead and handle OPT_fintrinsic_modules_path_ the same as OPT_fintrinsic_modules_path.  But given that the option has been added already back in 2007, it is probably too late for that.
Comment 4 dave.anglin 2013-01-07 16:09:14 UTC
On 1/7/2013 7:50 AM, jakub at gcc dot gnu.org wrote:
> Guess related to -fintrinsic-module-path.
Have being doing a regression search and it seems to be
pointing to this change.  Seem to have to do a full bootstrap
to test.  Sometimes test is unresolved.

Will try you your suggestion.

Dave
Comment 5 dave.anglin 2013-01-08 03:34:15 UTC
With the patch, the tests are unresolved with r194997:

UNSUPPORTED: libgomp.fortran/omp_parse3.f90  -O0
UNSUPPORTED: libgomp.fortran/omp_parse3.f90  -O1
UNSUPPORTED: libgomp.fortran/omp_parse3.f90  -O2
UNSUPPORTED: libgomp.fortran/omp_parse3.f90  -O3 -fomit-frame-pointer
UNSUPPORTED: libgomp.fortran/omp_parse3.f90  -O3 -fomit-frame-pointer - 
funroll-loops
UNSUPPORTED: libgomp.fortran/omp_parse3.f90  -O3 -fomit-frame-pointer - 
funroll-all-loops -finline-functions
UNSUPPORTED: libgomp.fortran/omp_parse3.f90  -O3 -g
UNSUPPORTED: libgomp.fortran/omp_parse3.f90  -Os

I'm fairly certain that the tests passed before the -fintrinsic- 
modules-path was added to fortran.exp.

On 7-Jan-13, at 7:50 AM, jakub at gcc dot gnu.org wrote:

> Can you try perhaps:
> --- libgomp/testsuite/libgomp.fortran/fortran.exp    2012-12-20
> 11:38:48.663282599 +0100
> +++ libgomp/testsuite/libgomp.fortran/fortran.exp    2013-01-07
> 13:45:51.557361907 +0100
> @@ -14,7 +14,7 @@ set quadmath_library_path "../libquadmat
> dg-init
>
> if { $blddir != "" } {
> -    lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path
> ${blddir}"
> +    lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path 
> ${blddir}"
>     # Look for a static libgfortran first.
>     if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
>         set lang_test_file "${lang_library_path}/libgfortran.a"

--
John David Anglin	dave.anglin@bell.net
Comment 6 Jakub Jelinek 2013-01-08 08:13:02 UTC
On HP-UX or Linux?  The test is guarded with
! { dg-require-effective-target tls_runtime }
does the OS have assembly/linker and runtime TLS support?
Can you attach libgomp.log ?
Comment 7 dave.anglin 2013-01-08 15:29:49 UTC
Created attachment 29115 [details]
libgomp.log.gz

On 1/8/2013 3:13 AM, jakub at gcc dot gnu.org wrote:
> On HP-UX or Linux?  The test is guarded with
> ! { dg-require-effective-target tls_runtime }
> does the OS have assembly/linker and runtime TLS support?
HP-UX.  HP-UX uses emutls.  Ii looks to me as this should provide
runtime support but there are some regressions in TLS support at the
moment (PR 54908).  Thought this was specific to C++ but maybe
it affects check_effective_target_tls_runtime.

Test is ok on Linux.
> Can you attach libgomp.log ?
Have to do another build...
Comment 8 dave.anglin 2013-01-09 04:16:22 UTC
On 8-Jan-13, at 10:29 AM, dave.anglin at bell dot net wrote:

>> Can you attach libgomp.log ?
> Have to do another build...


This time I ran the full libgomp testsuite and I'm back to the same  
driver
error.  I'm thinking the -fintrinsic-modules-path option needs and '='  
and
that the tls_runtime check fails when I just run the fortran tests.

--
John David Anglin	dave.anglin@bell.net
Comment 9 dave.anglin 2013-01-09 04:46:36 UTC
Created attachment 29158 [details]
patch-55884.d.txt

On 8-Jan-13, at 11:15 PM, John David Anglin wrote:

> I'm thinking the -fintrinsic-modules-path option needs and '=' and
> that the tls_runtime check fails when I just run the fortran tests.

--
John David Anglin	dave.anglin@bell.net
Comment 10 dave.anglin 2013-01-13 21:27:19 UTC
> Can you try perhaps:
> --- libgomp/testsuite/libgomp.fortran/fortran.exp    2012-12-20
> 11:38:48.663282599 +0100
> +++ libgomp/testsuite/libgomp.fortran/fortran.exp    2013-01-07
> 13:45:51.557361907 +0100
> @@ -14,7 +14,7 @@ set quadmath_library_path "../libquadmat
> dg-init
>
> if { $blddir != "" } {
> -    lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path
> ${blddir}"
> +    lappend ALWAYS_CFLAGS "additional_flags=-fintrinsic-modules-path 
> ${blddir}"
>     # Look for a static libgfortran first.
>     if [file exists "${blddir}/${lang_library_path}/libgfortran.a"] {
>         set lang_test_file "${lang_library_path}/libgfortran.a"
>
> ?  Though, I'd say using Joined Separate for such named option is  
> just wrong,
> it is fine for single letter options like -B, -A, -D, -U etc., but  
> for options
> of this kind I think it would be much better if it was
> fintrinsic-modules-path
> Fortran RejectNegative Separate
> Specify where to find the compiled intrinsic modules
>
> fintrinsic-modules-path=
> Fortran RejectNegative Joined
> Specify where to find the compiled intrinsic modules
>
> instead and handle OPT_fintrinsic_modules_path_ the same as
> OPT_fintrinsic_modules_path.  But given that the option has been  
> added already
> back in 2007, it is probably too late for that.


With the attached change, the fortran libgomp testsuite runs without  
errors.

Using a space to separate the option and its value still doesn't  
work.  Joining
option and value results in an unrecognizable option and all tests fail.

--
John David Anglin	dave.anglin@bell.net
Comment 11 Tobias Burnus 2013-01-16 16:19:42 UTC
Author: burnus
Date: Wed Jan 16 16:19:32 2013
New Revision: 195242

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=195242
Log:
gcc/fortran/
2013-01-16  Jakub Jelinek  <jakub@redhat.com>
            Tobias Burnus  <burnus@net-b.de>

        PR driver/55884
        * lang.opt (fintrinsic-modules-path): Don't accept Joined.
        (fintrinsic-modules-path=): New.
        * options.c (gfc_handle_option, gfc_get_option_string,
        gfc_get_option_string): Handle the latter.

libgomp/
2013-01-16  Jakub Jelinek  <jakub@redhat.com>
            Tobias Burnus  <burnus@net-b.de>

        PR driver/55884
        * testsuite/libgomp.fortran/fortran.exp: Use
        -fintrinsic-modules-path= instead of
        -fintrinsic-modules-path.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/lang.opt
    trunk/gcc/fortran/options.c
    trunk/libgomp/ChangeLog
    trunk/libgomp/testsuite/libgomp.fortran/fortran.exp
Comment 12 Jakub Jelinek 2013-01-16 16:35:30 UTC
Assuming fixed.