public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/20085] New: iargc returns wrong count for number of program arguments
@ 2005-02-19 23:16 dir at lanl dot gov
  2005-02-19 23:31 ` [Bug libfortran/20085] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: dir at lanl dot gov @ 2005-02-19 23:16 UTC (permalink / raw)
  To: gcc-bugs

Function iargc return the wrong argument count on the Macintosh. It returns 1
when it should be zero etc... -

[dir:~/tests/gfortran] dir% gfortran -o mopen mopen.f
[dir:~/tests/gfortran] dir% mopen
           1                                                                   
             
STOP 0
[dir:~/tests/gfortran] dir% mopen one
           1 one                                                               
             
           2                                                                   
             
STOP 0
[dir:~/tests/gfortran] dir% cat mopen.f
      program mopen
      character*80 c
      integer i,iargc
      iargs=iargc()
      do 10 i=1,iargs
      call getarg(i,c)
      write(*,*)i,c
   10 continue
      stop
      end      
[dir:~/tests/gfortran] dir%

-- 
           Summary: iargc returns wrong count for number of program
                    arguments
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dir at lanl dot gov
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: powerpc-apple-darwin7.8.0


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


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

* [Bug libfortran/20085] iargc returns wrong count for number of program arguments
  2005-02-19 23:16 [Bug fortran/20085] New: iargc returns wrong count for number of program arguments dir at lanl dot gov
@ 2005-02-19 23:31 ` pinskia at gcc dot gnu dot org
  2005-02-20 15:29 ` sgk at troutmask dot apl dot washington dot edu
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-19 23:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-19 18:07 -------
Confirmed, just an off by one error as we are counting the program name (aka argument 0).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
OtherBugsDependingO|                            |19292
              nThis|                            |
             Status|UNCONFIRMED                 |NEW
          Component|fortran                     |libfortran
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-02-19 18:07:02
               date|                            |


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


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

* [Bug libfortran/20085] iargc returns wrong count for number of program arguments
  2005-02-19 23:16 [Bug fortran/20085] New: iargc returns wrong count for number of program arguments dir at lanl dot gov
  2005-02-19 23:31 ` [Bug libfortran/20085] " pinskia at gcc dot gnu dot org
@ 2005-02-20 15:29 ` sgk at troutmask dot apl dot washington dot edu
  2005-02-20 21:41 ` cvs-commit at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sgk at troutmask dot apl dot washington dot edu @ 2005-02-20 15:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From sgk at troutmask dot apl dot washington dot edu  2005-02-20 05:00 -------
Patch is here

http://gcc.gnu.org/ml/gcc-patches/2005-02/msg01148.html

-- 


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


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

* [Bug libfortran/20085] iargc returns wrong count for number of program arguments
  2005-02-19 23:16 [Bug fortran/20085] New: iargc returns wrong count for number of program arguments dir at lanl dot gov
  2005-02-19 23:31 ` [Bug libfortran/20085] " pinskia at gcc dot gnu dot org
  2005-02-20 15:29 ` sgk at troutmask dot apl dot washington dot edu
@ 2005-02-20 21:41 ` cvs-commit at gcc dot gnu dot org
  2005-02-20 22:18 ` kargl at gcc dot gnu dot org
  2005-02-28 20:47 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-20 21:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-20 15:24 -------
Subject: Bug 20085

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	kargl@gcc.gnu.org	2005-02-20 15:24:02

Modified files:
	libgfortran    : ChangeLog 
	libgfortran/intrinsics: args.c 

Log message:
	PR 20085
	* intrinsic/args.c (iargc): Off by 1.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/ChangeLog.diff?cvsroot=gcc&r1=1.158&r2=1.159
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libgfortran/intrinsics/args.c.diff?cvsroot=gcc&r1=1.5&r2=1.6



-- 


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


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

* [Bug libfortran/20085] iargc returns wrong count for number of program arguments
  2005-02-19 23:16 [Bug fortran/20085] New: iargc returns wrong count for number of program arguments dir at lanl dot gov
                   ` (2 preceding siblings ...)
  2005-02-20 21:41 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-20 22:18 ` kargl at gcc dot gnu dot org
  2005-02-28 20:47 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-02-20 22:18 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From kargl at gcc dot gnu dot org  2005-02-20 15:37 -------
Patch applied.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


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


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

* [Bug libfortran/20085] iargc returns wrong count for number of program arguments
  2005-02-19 23:16 [Bug fortran/20085] New: iargc returns wrong count for number of program arguments dir at lanl dot gov
                   ` (3 preceding siblings ...)
  2005-02-20 22:18 ` kargl at gcc dot gnu dot org
@ 2005-02-28 20:47 ` pinskia at gcc dot gnu dot org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-28 20:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-02-28 13:45 -------
*** Bug 20246 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anlauf at hep dot tu-
                   |                            |darmstadt dot de


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


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

end of thread, other threads:[~2005-02-28 13:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-02-19 23:16 [Bug fortran/20085] New: iargc returns wrong count for number of program arguments dir at lanl dot gov
2005-02-19 23:31 ` [Bug libfortran/20085] " pinskia at gcc dot gnu dot org
2005-02-20 15:29 ` sgk at troutmask dot apl dot washington dot edu
2005-02-20 21:41 ` cvs-commit at gcc dot gnu dot org
2005-02-20 22:18 ` kargl at gcc dot gnu dot org
2005-02-28 20:47 ` pinskia 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).