public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/41160]  New: No more than one complex function in a file
@ 2009-08-25  0:20 bdavis at gcc dot gnu dot org
  2009-08-25  0:36 ` [Bug fortran/41160] " kargl at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2009-08-25  0:20 UTC (permalink / raw)
  To: gcc-bugs

gfortran gives an error, g77 accepts it without a problem



[bdavis@localhost ~/tmp]$ cat a.f
      COMPLEX FUNCTION F0_HDEC*16(M1,M2,QSQ)
      RETURN
      END
      COMPLEX FUNCTION F1_HDEC*16(M1,M2,QSQ)
      RETURN 
      END
[bdavis@localhost ~/tmp]$ /home/bdavis/g77/run/bin/g77 -c a.f
[bdavis@localhost ~/tmp]$ gfortran -c a.f
a.f:1.30:

      COMPLEX FUNCTION F0_HDEC*16(M1,M2,QSQ)                            
                              1
Error: Expected formal argument list in function definition at (1)
a.f:4.30:

      COMPLEX FUNCTION F1_HDEC*16(M1,M2,QSQ)                            
                              1
Error: Expected formal argument list in function definition at (1)
a.f:2.72:

      RETURN                                                            
                                                                        1
a.f:5.72:

      RETURN                                                            
                                                                        2
Error: Two main PROGRAMs at (1) and (2)


-- 
           Summary: No more than one complex function in a file
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bdavis at gcc dot gnu dot org


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


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

* [Bug fortran/41160] No more than one complex function in a file
  2009-08-25  0:20 [Bug fortran/41160] New: No more than one complex function in a file bdavis at gcc dot gnu dot org
@ 2009-08-25  0:36 ` kargl at gcc dot gnu dot org
  2009-08-25  0:40 ` kargl at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-08-25  0:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from kargl at gcc dot gnu dot org  2009-08-25 00:36 -------
There isn't a problem with having more than 2 complex function
in a file.  The problem is that your complex functions are 
using a nonstandard extension.
REMOVE:kargl[242] cat > k.f90
      COMPLEX FUNCTION F0_HDEC*16(M1,M2,QSQ)
      RETURN
      END
REMOVE:kargl[243] gfc4x -c k.f90
k.f90:1.30:

      COMPLEX FUNCTION F0_HDEC*16(M1,M2,QSQ)
                              1
Error: Expected formal argument list in function definition at (1)

Notice is error is point at the *.  I'm fairly certain that there
was a previous bug report about this form, and it was decided that
it would not be supported.  I'll see if I can find the old bug
report.  Perhpas, tobias remembers the details.


-- 


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


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

* [Bug fortran/41160] No more than one complex function in a file
  2009-08-25  0:20 [Bug fortran/41160] New: No more than one complex function in a file bdavis at gcc dot gnu dot org
  2009-08-25  0:36 ` [Bug fortran/41160] " kargl at gcc dot gnu dot org
@ 2009-08-25  0:40 ` kargl at gcc dot gnu dot org
  2009-08-25  2:04 ` bdavis at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-08-25  0:40 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from kargl at gcc dot gnu dot org  2009-08-25 00:40 -------
OK.  I found it.  This is probably a duplicate of
PR 36234


-- 


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


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

* [Bug fortran/41160] No more than one complex function in a file
  2009-08-25  0:20 [Bug fortran/41160] New: No more than one complex function in a file bdavis at gcc dot gnu dot org
  2009-08-25  0:36 ` [Bug fortran/41160] " kargl at gcc dot gnu dot org
  2009-08-25  0:40 ` kargl at gcc dot gnu dot org
@ 2009-08-25  2:04 ` bdavis at gcc dot gnu dot org
  2009-08-25  2:10 ` jvdelisle at gcc dot gnu dot org
  2009-08-25  2:29 ` kargl at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: bdavis at gcc dot gnu dot org @ 2009-08-25  2:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from bdavis at gcc dot gnu dot org  2009-08-25 02:03 -------
lets close with no action taken.

*** This bug has been marked as a duplicate of 36234 ***


-- 

bdavis at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


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


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

* [Bug fortran/41160] No more than one complex function in a file
  2009-08-25  0:20 [Bug fortran/41160] New: No more than one complex function in a file bdavis at gcc dot gnu dot org
                   ` (2 preceding siblings ...)
  2009-08-25  2:04 ` bdavis at gcc dot gnu dot org
@ 2009-08-25  2:10 ` jvdelisle at gcc dot gnu dot org
  2009-08-25  2:29 ` kargl at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-08-25  2:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from jvdelisle at gcc dot gnu dot org  2009-08-25 02:10 -------
This turns out to be the exact bug that Diego reported in his recent email. He
sent me the code off list.  g77 compiles it fine.  gfortran does this:

Obviously legacy code issue.  I wonder how many other cases we will bump in to.

hgaga.f:1.33:

      COMPLEX FUNCTION CFACQ_HDEC*16(ICASE,AMH,AMQ)                     
                                 1
Error: Expected formal argument list in function definition at (1)
hgaga.f:11.33:

      COMPLEX FUNCTION CKOFQ_HDEC*16(ICASE,RHO)                         
                                 1
Error: Expected formal argument list in function definition at (1)
hgaga.f:3.72:

      IMPLICIT DOUBLE PRECISION (A-B,D-H,O-Z), COMPLEX*16 (C)           
                                                                        1
hgaga.f:15.72:

      PARAMETER(NN=999,N=461,NCUT1=46,NCUT2=54,NCUT3=251)               
                                                                        2
Error: Two main PROGRAMs at (1) and (2)
make: *** [hgaga.o] Error 1


-- 


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


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

* [Bug fortran/41160] No more than one complex function in a file
  2009-08-25  0:20 [Bug fortran/41160] New: No more than one complex function in a file bdavis at gcc dot gnu dot org
                   ` (3 preceding siblings ...)
  2009-08-25  2:10 ` jvdelisle at gcc dot gnu dot org
@ 2009-08-25  2:29 ` kargl at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2009-08-25  2:29 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from kargl at gcc dot gnu dot org  2009-08-25 02:28 -------
(In reply to comment #4)
> This turns out to be the exact bug that Diego reported in his recent email. He
> sent me the code off list.  g77 compiles it fine.  gfortran does this:
> 
> Obviously legacy code issue.  I wonder how many other cases we will bump in to.

See the audit trail for PR 36234.  I've compile millions of
lines of code from numerous websites across the global.  I've
never hit this problem.

> 
> hgaga.f:1.33:
>

This file is part of 

http://lappweb.in2p3.fr/~muehlleitner/SUSY-HIT/

A quick inspection of the code suggests that one
should steer clear of the package for one's own
computation.

-- 
steve


-- 


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


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

end of thread, other threads:[~2009-08-25  2:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-25  0:20 [Bug fortran/41160] New: No more than one complex function in a file bdavis at gcc dot gnu dot org
2009-08-25  0:36 ` [Bug fortran/41160] " kargl at gcc dot gnu dot org
2009-08-25  0:40 ` kargl at gcc dot gnu dot org
2009-08-25  2:04 ` bdavis at gcc dot gnu dot org
2009-08-25  2:10 ` jvdelisle at gcc dot gnu dot org
2009-08-25  2:29 ` kargl 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).