public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/26064]  New: 4.1 regression introduced with patch for bug 18197
@ 2006-02-01 14:27 sven dot buijssen at math dot uni-dortmund dot de
  2006-02-01 14:46 ` [Bug fortran/26064] " pinskia at gcc dot gnu dot org
                   ` (13 more replies)
  0 siblings, 14 replies; 15+ messages in thread
From: sven dot buijssen at math dot uni-dortmund dot de @ 2006-02-01 14:27 UTC (permalink / raw)
  To: gcc-bugs

Erik Edelmann's patch for PR fortran/18197 introduced a regression. 

a) The following test case does not compile with gfortran >= Revision 108555

--- cut here ---
% cat > foo.h <<EOF
interface
  function foo() result (dresult)
    real :: dresult
  end function foo
end interface
EOF

% cat > regression.f90 <<EOF
module regression

contains

  subroutine helper(foo)
    include "foo.h"
  end subroutine helper

  subroutine master(foo)
    include "foo.h"
    call slave(foo, helper)
  end subroutine master

  subroutine slave(foo, subslave)
    include "foo.h"
    interface
      subroutine subslave(foo)
        include "foo.h"
      end subroutine subslave
    end interface
    call subslave(foo)
  end subroutine slave

end module regression
EOF
--- cut here ---

instead gfortran gives:

% gfortran -v -c regression.f90
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../../src/gcc/configure --enable-shared
--prefix=/home/[...]/20060201 --enable-languages=c,c++,fortran --enable-threads
--enable-__cxa_atexit
Thread model: posix
gcc version 4.2.0 20060201 (experimental)
 /home/[...]/20060201/bin/../libexec/gcc/i686-pc-linux-gnu/4.2.0/f951
regression.f90 -quiet -dumpbase regression.f90 -mtune=generic -auxbase
regression -version -o /tmp/ccNFDNgH.s
GNU F95 version 4.2.0 20060201 (experimental) (i686-pc-linux-gnu)
        compiled by GNU C version 4.2.0 20060201 (experimental).
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096

 In file regression.f90:11

    call slave(foo, helper)
                  1
Error: Type/rank mismatch in argument 'subslave' at (1)

b) Swapping the order of subroutines helper and master in above testcase
resolves the regression, gfortran compiles smoothly. (The complexity of the
code I actually tried to compile is higher and I did not find a suitable
permutation of subroutines yet.)

c) Compiling the current revision (110474) having reverted only Erik's patch:

--- cut here ---
% cat > undopatch18197 <<EOF
140a141,151
>           else
>             {
>                /* Set the type of the RESULT, then copy.  */
>               if (sym->result->ts.type == BT_UNKNOWN)
>                 gfc_set_default_type (sym->result, 1, sym->result->ns);
>
>               sym->ts = sym->result->ts;
>               if (sym->as == NULL)
>                 sym->as = gfc_copy_array_spec (sym->result->as);
>             }
>
EOF

% patch gcc/fortran/resolve.c < undopatch18197
% ./configure [....]; make bootstrap install
--- cut here ---

the above testcase compiles smoothly again - while reopening the error reported
in bug 18197 (and causing another error in my already mentioned code I could
not reduce to a small testcase so far.)


-- 
           Summary: 4.1 regression introduced with patch for bug 18197
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sven dot buijssen at math dot uni-dortmund dot de
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26064


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2006-03-07 22:31 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-01 14:27 [Bug fortran/26064] New: 4.1 regression introduced with patch for bug 18197 sven dot buijssen at math dot uni-dortmund dot de
2006-02-01 14:46 ` [Bug fortran/26064] " pinskia at gcc dot gnu dot org
2006-02-01 16:36 ` sven dot buijssen at math dot uni-dortmund dot de
2006-02-01 16:49 ` hjl at lucon dot org
2006-02-01 17:00 ` hjl at lucon dot org
2006-02-01 20:01 ` sven dot buijssen at math dot uni-dortmund dot de
2006-02-01 21:20 ` hjl at lucon dot org
2006-02-02  1:19 ` hjl at lucon dot org
2006-02-02 11:30 ` sven dot buijssen at math dot uni-dortmund dot de
2006-02-02 14:49 ` hjl at lucon dot org
2006-02-02 16:12 ` sven dot buijssen at math dot uni-dortmund dot de
2006-02-05 19:52 ` hjl at gcc dot gnu dot org
2006-02-05 19:53 ` hjl at gcc dot gnu dot org
2006-03-07 22:29 ` hjl at gcc dot gnu dot org
2006-03-07 22:31 ` hjl at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).