public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: DEC Extension Support for gcc-4.8.3
@ 2016-03-08 18:14 Walter Spector
  2016-03-08 18:26 ` Jerry DeLisle
  0 siblings, 1 reply; 12+ messages in thread
From: Walter Spector @ 2016-03-08 18:14 UTC (permalink / raw)
  To: Jerry DeLisle, gfortran

Jerry DeLisle <jvdelisle@charter.net> wrote:
>IMHO for some of these things on legacy code, judicious use of editors like sed
>should be used on the source codes and just bring them out of the dark ages.  It
>really is not that hard.  If the code is that important then just do it.
>Hacking compilers out of laziness just does not seem right.
>
>I am not saying anyone is lazy and do not intend to offend, I fully understand
>what it is like to have over bearing workloads, but we should at least do a
>reality check.

That is MHO too.  A lot of simple stuff should just be fixed to be Standard conforming and be done with it.  In the case of VAX structures _without_ unions, it is pretty straightforward to simply use normal Fortran derived types.  Ones that do have unions need to be considered much more carefully.  Use of type extension and classes can solve some cases, but not all.

Just remembered (and confirmed via some docs at bitsavers) that CDC Fortran used to use $ to separate multiple statements on a single line.  This of course was directly incompatible with IBM G and H Extendeds allowance of $ in variable names.

Walter

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: DEC Extension Support for gcc-4.8.3
@ 2016-03-08 22:03 W Spector
  0 siblings, 0 replies; 12+ messages in thread
From: W Spector @ 2016-03-08 22:03 UTC (permalink / raw)
  To: gfortran

Jim Secan <james dot secan at gmail dot com> wrote:

> ... Others, structures being the main one, also raise old memories (and not fond ones) of the Fortran committee rejecting this de-facto standard in the first place.

DEC added VAX structures in an intentionally incompatible way from the 
direction the Fortran committee was headed.  Blame should be on DEC - 
not the Fortran committee.

That said, I've dealt with some Fortran code in the past where having a 
'union' capability in derived types would have been quite helpful.  I 
was able to work around it with some clever use (read: giant hack) of 
F90 pointers, and it worked.  However if I were to revisit that project 
today, I would try really hard to use type extension to eliminate some 
of the cleverness/hackishness.

So I am not really against gfortran including VAX structures/unions - 
provided they are only enabled via special compiler flags.  I know what 
a PITA it can be in certain cases to work around not having them - 
especially when porting old code.

A number of the other VAX extensions have direct substitutions in modern 
Fortran.  Simple editing tools and shell scripts can be used to do the 
substitutions for an entire code base in a few seconds.  So I am less 
sympathetic to them.

Walter

^ permalink raw reply	[flat|nested] 12+ messages in thread
* Re: DEC Extension Support for gcc-4.8.3
@ 2016-03-08  0:11 W Spector
  2016-03-08 17:45 ` Jerry DeLisle
  0 siblings, 1 reply; 12+ messages in thread
From: W Spector @ 2016-03-08  0:11 UTC (permalink / raw)
  To: gfortran

Tim Prince <n8tm at aol dot com> wrote:
> ... I thought the purpose of permitting '$' was to support VMS system function calls, so implicit integer may make sense. Such programs evidently won't be portable even if you reconcile this bit.

Allowing $ in variable names was an old, old, ('60s/'70s) IBM mainframe 
extension, and maybe others of the era too.  I first encountered it in 
1978 or so. So definitely pre-VAX.

Some dusty brain cells are thinking it may have been also used by some 
compilers (or pre-processors) to separate statements on a single line. 
Which of course is now done with semi-colons.

Walter

^ permalink raw reply	[flat|nested] 12+ messages in thread
* DEC Extension Support for gcc-4.8.3
@ 2016-03-04 16:19 Fritz Reese
  2016-03-05 22:08 ` Bernhard Reutner-Fischer
  0 siblings, 1 reply; 12+ messages in thread
From: Fritz Reese @ 2016-03-04 16:19 UTC (permalink / raw)
  To: fortran

[-- Attachment #1: Type: text/plain, Size: 2520 bytes --]

All,

I have been getting a lot of requests to release the patches I have
for gcc-4.8.3, since many systems (i.e. RHEL/CentOS 6.x) still ship
with that version of the compiler suite. I thought it would be nice to
post those changes on the mailing list for all to see, though all the
changes may not end up in the baseline. I'm still planning on breaking
up most of these changes into individual patches and submitting them
for review against trunk, but this patch may be useful to those who
are impatient. The patched 4.8.3 clears all regtests and includes its
own testsuite. If you have problems with this patch please message me
directly, do not pollute the gcc/fortran mailing list. I don't intend
to publicly support updates to this patch set. Any updates I do will
make their way into the patches I submit on trunk in due time.

With that said, attached is the monolithic patch which contains ALL of
the DEC extension support I have implemented into 4.8.3.  Most of the
changes can be found by digging through the info/man pages of the new
Fortran compiler. Here is a summary of all new compiler options:

 -finit-derived Enable initialization of derived-type (and structure)
variables, as with -finit-local-zero and -finit-* (not a DEC extension
per se)
 -Wargument-mismatch/-Wno-argument-mismatch Enable/disable warnings
for type/rank mismatches between formal parameters and actual
arguments
 -fdec Enable all options listed below, as well as -fdollar-ok and
-fd-lines-as-comments
 -fdec-member-dot Enable dot ('.') as a member accessor.
 -fdec-structure Enable support for STRUCTURE, RECORD, UNION, and MAP.
Implies -fdec-member-dot
 -fdec-intrinsic-ints Enable B/I/J/K kind variants for integer intrinsics
 -fdec-bitwise-ops Allow logical operations on integers, and perform
the equivalent bitwise operation
 -flazy-logicals Disable errors and warnings when using integers as
conditional expressions. Implies -fdec-bitwise-ops
 -fdec-extended-int Enable the DEC extended integer constant format "base#value"
 -fdec-io Enable DEC extended IO syntax, including READONLY, SHARED
and CARRIAGECONTROL specifiers
 -fdec-static Enable STATIC and AUTOMATIC as attributes specifying
storage location
 -fdec-logical-xor Enable the logical .XOR. function (same as .NEQV.)
 -fdec-math Enable extra math intrinsics, such as COTAN and
degree-valued trig functions
 -ffeed Treat form feed ("\f") characters as whitespace in the source
 -ftype-print Interpret TYPE as an alias for PRINT when possible

Enjoy!

---
Fritz Reese

[-- Attachment #2: gcc48-for-0011.patch.gz --]
[-- Type: application/x-gzip, Size: 111843 bytes --]

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

end of thread, other threads:[~2016-03-09 10:41 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-08 18:14 DEC Extension Support for gcc-4.8.3 Walter Spector
2016-03-08 18:26 ` Jerry DeLisle
  -- strict thread matches above, loose matches on Subject: below --
2016-03-08 22:03 W Spector
2016-03-08  0:11 W Spector
2016-03-08 17:45 ` Jerry DeLisle
2016-03-08 18:39   ` Jim Secan
2016-03-09 10:41   ` Jim MacArthur
2016-03-04 16:19 Fritz Reese
2016-03-05 22:08 ` Bernhard Reutner-Fischer
2016-03-05 22:37   ` Fritz Reese
2016-03-06  0:09     ` Bernhard Reutner-Fischer
2016-03-06 13:17       ` Tim Prince

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).