public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/37468]  New: error when combining -i8 with .F files
@ 2008-09-10 19:38 charles at schwieters dot org
  2008-09-10 19:43 ` [Bug fortran/37468] " pinskia at gcc dot gnu dot org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: charles at schwieters dot org @ 2008-09-10 19:38 UTC (permalink / raw)
  To: gcc-bugs

Files with the suffix .F are first sent to the C preprocessor. When I combine
this with -i8 (specifying 64 bit integers), I get the following error. It seems
that the -i8 is mistakenly sent to the C preprocessor.

gfortran -c -i8 -fno-range-check  -ffixed-line-length-120
-fno-second-underscore -fpic  -i8 -DZOMPLEX c_ffti.F -o zffti.o
cc1: error: unrecognized command line option "-i8"


-- 
           Summary: error when combining -i8 with .F files
           Product: gcc
           Version: 4.3.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: charles at schwieters dot org
  GCC host triplet: (amd64 - Debian testing  - gfortran-4.3


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


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

* [Bug fortran/37468] error when combining -i8 with .F files
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
@ 2008-09-10 19:43 ` pinskia at gcc dot gnu dot org
  2008-09-11 19:53 ` charles at schwieters dot org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-09-10 19:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2008-09-10 19:42 -------
-i8 does not exist anyways, it is -fdefault-integer-8.


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

* [Bug fortran/37468] error when combining -i8 with .F files
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
  2008-09-10 19:43 ` [Bug fortran/37468] " pinskia at gcc dot gnu dot org
@ 2008-09-11 19:53 ` charles at schwieters dot org
  2008-09-14 14:21 ` tkoenig at gcc dot gnu dot org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: charles at schwieters dot org @ 2008-09-11 19:53 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from charles at schwieters dot org  2008-09-11 19:51 -------
thanks for pointing that out. -fdefault-integer-8 works fine.

However, the -i8 behavior *is* confusing:

% gfortran -c -i8 t.f
% gfortran -c -i8 t.F
cc1: error: unrecognized command line option "-i8"

i.e. it *seems* to work for .f files, but not for .F files.


-- 

charles at schwieters dot org changed:

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


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


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

* [Bug fortran/37468] error when combining -i8 with .F files
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
  2008-09-10 19:43 ` [Bug fortran/37468] " pinskia at gcc dot gnu dot org
  2008-09-11 19:53 ` charles at schwieters dot org
@ 2008-09-14 14:21 ` tkoenig at gcc dot gnu dot org
  2008-09-14 15:10 ` dominiq at lps dot ens dot fr
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-09-14 14:21 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from tkoenig at gcc dot gnu dot org  2008-09-14 14:20 -------
I can't find a mention of -i8 in the gfortran
documentation.  I wonder if it even should work...

Confirmed, the current behavior is at least inconsistent.


-- 

tkoenig at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2008-09-14 14:20:15
               date|                            |


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


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

* [Bug fortran/37468] error when combining -i8 with .F files
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
                   ` (2 preceding siblings ...)
  2008-09-14 14:21 ` tkoenig at gcc dot gnu dot org
@ 2008-09-14 15:10 ` dominiq at lps dot ens dot fr
  2008-09-14 16:13 ` dominiq at lps dot ens dot fr
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-09-14 15:10 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dominiq at lps dot ens dot fr  2008-09-14 15:09 -------
I am not sure, but I seems to remember a discussion about the fact that -i8
could not be used and -fdefault-integer-8 has been chosen because -i has some
meaning after compilation (linker?). Does it ring some bell among the
old-timers?


-- 


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


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

* [Bug fortran/37468] error when combining -i8 with .F files
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
                   ` (3 preceding siblings ...)
  2008-09-14 15:10 ` dominiq at lps dot ens dot fr
@ 2008-09-14 16:13 ` dominiq at lps dot ens dot fr
  2008-11-28 23:04 ` [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver dfranke at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-09-14 16:13 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dominiq at lps dot ens dot fr  2008-09-14 16:12 -------
I have found it: http://gcc.gnu.org/ml/fortran/2005-03/msg00189.html

RFC: renaming -i8, -r8, and -d8

From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
To: fortran at gcc dot gnu dot org
Date: Fri, 11 Mar 2005 11:13:41 -0800
Subject: RFC: renaming -i8, -r8, and -d8
Jim Wilson provided a detail explanation of the GCC options handling
scheme in http://gcc.gnu.org/ml/gcc/2005-03/msg00513.html.

Because -i*, -r*, and -d* are reserved for preprocessing, linking,
and debugging options, respectively, and -f* is specifically reserved
for frontend options, I proposal that we rename the -i8, -r8, and
-d8 options to -fi8, -fr8, and -fd8.   These options can also
have long form aliases.  I also proposal the following semantics for
these options.

...


-- 


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


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

* [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
                   ` (4 preceding siblings ...)
  2008-09-14 16:13 ` dominiq at lps dot ens dot fr
@ 2008-11-28 23:04 ` dfranke at gcc dot gnu dot org
  2008-11-28 23:24 ` dfranke at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-11-28 23:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from dfranke at gcc dot gnu dot org  2008-11-28 23:02 -------
In gcc.c (cpp_unique_options) we have "%{i*}" which passes on any -i<something>
it might encounter, including -i8. This is why we get an error if preprocessing
is enabled, as -i8 is not known. So, the problem is not getting an error with
.F, but getting no error with .f!

Now, looking for the whereabouts of -i8, one sees with -v that it's not passed
to f951, hence it was eaten by the driver?! Interestingly, using -k8, the
compiler complains: "unrecognized option '-k8'". In gcc.c (main) we find:

  /* Now we have the specs.
     Set the `valid' bits for switches that match anything in any spec.  */

  validate_all_switches ();

Which includes the cpp-spec which uses (cpp_unique_options). Thus, we have a
pass interested in the '-i8', namely cpp, which then is never run. In order to
make f951 complain about -i*, we need to forward it in the specs. Otherwise it
will be simply skipped - to be used with a pass never run.


Propsed patch for trunk/4.4 (not regtested yet):

Index: lang-specs.h
===================================================================
--- lang-specs.h        (revision 142255)
+++ lang-specs.h        (working copy)
@@ -23,7 +23,7 @@

 #define F951_CPP_OPTIONS "%{!nocpp: -cpp %g.f90 %(cpp_options)\
                           %{E|M|MM:%(cpp_debug_options) -fsyntax-only} %{E}}"
-#define F951_OPTIONS     "%(cc1_options) %{J*} %{!cpp: %{I*}}\
+#define F951_OPTIONS     "%(cc1_options) %{J*} %{!cpp: %{I*} %{i*}}\
                           %{!nostdinc:-fintrinsic-modules-path finclude%s}\
                           %{!fsyntax-only:%(invoke_as)}"
 #define F951_SOURCE_FORM  "%{!ffree-form:-ffixed-form}"


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org
         AssignedTo|unassigned at gcc dot gnu   |dfranke at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   GCC host triplet|(amd64 - Debian testing  -  |
                   |gfortran-4.3                |
           Keywords|                            |patch
   Last reconfirmed|2008-09-14 14:20:15         |2008-11-28 23:02:59
               date|                            |
            Summary|error when combining -i8    |unknown option -i<something>
                   |with .F files               |not recognized by gfortran
                   |                            |driver


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


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

* [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
                   ` (5 preceding siblings ...)
  2008-11-28 23:04 ` [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver dfranke at gcc dot gnu dot org
@ 2008-11-28 23:24 ` dfranke at gcc dot gnu dot org
  2008-12-02  1:20 ` pinskia at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-11-28 23:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dfranke at gcc dot gnu dot org  2008-11-28 23:23 -------
Regression test passed.
Patch: http://gcc.gnu.org/ml/fortran/2008-11/msg00370.html


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |http://gcc.gnu.org/ml/fortra
                   |                            |n/2008-11/msg00370.html


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


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

* [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
                   ` (6 preceding siblings ...)
  2008-11-28 23:24 ` dfranke at gcc dot gnu dot org
@ 2008-12-02  1:20 ` pinskia at gcc dot gnu dot org
  2008-12-09 19:55 ` dfranke at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-02  1:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from pinskia at gcc dot gnu dot org  2008-12-02 01:18 -------
*** Bug 38361 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |debian-gcc at lists dot
                   |                            |debian dot org


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


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

* [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
                   ` (7 preceding siblings ...)
  2008-12-02  1:20 ` pinskia at gcc dot gnu dot org
@ 2008-12-09 19:55 ` dfranke at gcc dot gnu dot org
  2008-12-09 19:58 ` dfranke at gcc dot gnu dot org
  2008-12-25  1:43 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-12-09 19:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from dfranke at gcc dot gnu dot org  2008-12-09 19:54 -------
Subject: Bug 37468

Author: dfranke
Date: Tue Dec  9 19:53:02 2008
New Revision: 142608

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142608
Log:
2008-12-09  Daniel Franke  <franke.daniel@gmail.com>

        PR fortran/36376
        PR fortran/37468
        * lang-specs.h: Pass on -i* options to f951 to (probably) report
        them as unknown. Duplicate gcc.c (cpp_options), but omit
        -fpch-preprocess on -save-temps.


Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/lang-specs.h


-- 


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


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

* [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
                   ` (8 preceding siblings ...)
  2008-12-09 19:55 ` dfranke at gcc dot gnu dot org
@ 2008-12-09 19:58 ` dfranke at gcc dot gnu dot org
  2008-12-25  1:43 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2008-12-09 19:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from dfranke at gcc dot gnu dot org  2008-12-09 19:56 -------
Fixed in trunk. Closing.


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver
  2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
                   ` (9 preceding siblings ...)
  2008-12-09 19:58 ` dfranke at gcc dot gnu dot org
@ 2008-12-25  1:43 ` pinskia at gcc dot gnu dot org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-25  1:43 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |4.4.0


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


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

end of thread, other threads:[~2008-12-25  1:43 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-09-10 19:38 [Bug fortran/37468] New: error when combining -i8 with .F files charles at schwieters dot org
2008-09-10 19:43 ` [Bug fortran/37468] " pinskia at gcc dot gnu dot org
2008-09-11 19:53 ` charles at schwieters dot org
2008-09-14 14:21 ` tkoenig at gcc dot gnu dot org
2008-09-14 15:10 ` dominiq at lps dot ens dot fr
2008-09-14 16:13 ` dominiq at lps dot ens dot fr
2008-11-28 23:04 ` [Bug fortran/37468] unknown option -i<something> not recognized by gfortran driver dfranke at gcc dot gnu dot org
2008-11-28 23:24 ` dfranke at gcc dot gnu dot org
2008-12-02  1:20 ` pinskia at gcc dot gnu dot org
2008-12-09 19:55 ` dfranke at gcc dot gnu dot org
2008-12-09 19:58 ` dfranke at gcc dot gnu dot org
2008-12-25  1:43 ` 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).