public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/24807]  New: Fortran supports real*16, but not complex*32
@ 2005-11-11 18:19 schnetter at aei dot mpg dot de
  2005-11-11 19:05 ` [Bug fortran/24807] " schnetter at aei dot mpg dot de
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-11-11 18:19 UTC (permalink / raw)
  To: gcc-bugs

The following piece of code shows

subroutine a
  implicit none
  real*16 x
  complex*32 y
end subroutine a

that gfortran

$ ~/gcc/bin/gfortran --version
GNU Fortran 95 (GCC) 4.1.0 20051110 (experimental)

supports the datatype real*16, but not complex*32.  Since a complex*32 consists
essentially of two real*16 components, either both or none should be supported.


-- 
           Summary: Fortran supports real*16, but not complex*32
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schnetter at aei dot mpg dot de
 GCC build triplet: powerpc-apple-darwin8.3.0
  GCC host triplet: powerpc-apple-darwin8.3.0
GCC target triplet: powerpc-apple-darwin8.3.0


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


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

* [Bug fortran/24807] Fortran supports real*16, but not complex*32
  2005-11-11 18:19 [Bug fortran/24807] New: Fortran supports real*16, but not complex*32 schnetter at aei dot mpg dot de
@ 2005-11-11 19:05 ` schnetter at aei dot mpg dot de
  2005-11-11 19:06 ` schnetter at aei dot mpg dot de
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-11-11 19:05 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from schnetter at aei dot mpg dot de  2005-11-11 19:05 -------
The reason of the problem is that the conversion from complex*N to real*M with
N=2M happens only for selected values.  The enclosed patch may help.


-- 


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


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

* [Bug fortran/24807] Fortran supports real*16, but not complex*32
  2005-11-11 18:19 [Bug fortran/24807] New: Fortran supports real*16, but not complex*32 schnetter at aei dot mpg dot de
  2005-11-11 19:05 ` [Bug fortran/24807] " schnetter at aei dot mpg dot de
@ 2005-11-11 19:06 ` schnetter at aei dot mpg dot de
  2005-11-19  0:14 ` fxcoudert at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-11-11 19:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from schnetter at aei dot mpg dot de  2005-11-11 19:06 -------
Created an attachment (id=10219)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10219&action=view)
Proposed patch


-- 


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


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

* [Bug fortran/24807] Fortran supports real*16, but not complex*32
  2005-11-11 18:19 [Bug fortran/24807] New: Fortran supports real*16, but not complex*32 schnetter at aei dot mpg dot de
  2005-11-11 19:05 ` [Bug fortran/24807] " schnetter at aei dot mpg dot de
  2005-11-11 19:06 ` schnetter at aei dot mpg dot de
@ 2005-11-19  0:14 ` fxcoudert at gcc dot gnu dot org
  2005-11-19  1:16 ` schnetter at aei dot mpg dot de
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-19  0:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from fxcoudert at gcc dot gnu dot org  2005-11-19 00:14 -------
(In reply to comment #1)
> The reason of the problem is that the conversion from complex*N to real*M with
> N=2M happens only for selected values.  The enclosed patch may help.

This patch is OK but I don't quite get the error message: what is the
"old-style complex kind"? Can you make it more explicit, or just simply say
"Complex kind not allowed at %L"?

Otherwise, it's OK to commit on mainline (4.0 doesn't need it because it
doesn't have support for large kinds anyway).


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
  GCC build triplet|powerpc-apple-darwin8.3.0   |
   GCC host triplet|powerpc-apple-darwin8.3.0   |
           Keywords|                            |patch
   Last reconfirmed|0000-00-00 00:00:00         |2005-11-19 00:14:42
               date|                            |
   Target Milestone|---                         |4.1.0


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


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

* [Bug fortran/24807] Fortran supports real*16, but not complex*32
  2005-11-11 18:19 [Bug fortran/24807] New: Fortran supports real*16, but not complex*32 schnetter at aei dot mpg dot de
                   ` (2 preceding siblings ...)
  2005-11-19  0:14 ` fxcoudert at gcc dot gnu dot org
@ 2005-11-19  1:16 ` schnetter at aei dot mpg dot de
  2005-11-19 14:51 ` kargl at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-11-19  1:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from schnetter at aei dot mpg dot de  2005-11-19 01:16 -------
The same error message was already given (a few lines further down) when the
kind had an unsupported value.  An old style kind is given in a declaration as
"real*8", a new style kind as "real(8)".

For integer and real types, the old and new style kinds are identical.  For
complex types, they differ, and the new style kind is half the old style kind. 
Since the old style kind is not part of the Fortran standard, there is no good
way of naming it.  One might instead call it the "size" of the type, since
real*8 is supposed to take up 8 bytes.

For a type "complex*15" it is not correct to say "complex kind 15 not
supported", since the "size" 15 should be mapped to the kind 7.5 (which is not
integer, which causes the error).  A "complex*16" has kind 8.

The same error message is already give a few lines further down in the code. 
Should we leave these messages as they are?  Or should we change them to use
"size" instead of "old style kind"?  Whichever we do, we should keep the
messages consistent.


-- 


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


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

* [Bug fortran/24807] Fortran supports real*16, but not complex*32
  2005-11-11 18:19 [Bug fortran/24807] New: Fortran supports real*16, but not complex*32 schnetter at aei dot mpg dot de
                   ` (3 preceding siblings ...)
  2005-11-19  1:16 ` schnetter at aei dot mpg dot de
@ 2005-11-19 14:51 ` kargl at gcc dot gnu dot org
  2005-11-19 19:38 ` schnetter at aei dot mpg dot de
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-11-19 14:51 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from kargl at gcc dot gnu dot org  2005-11-19 14:51 -------
How about "Old style type declaration at %L not supported"?
The 16 in complex*16 really isn't a kind type parameter, so
we should avoid calling it a kind.  If you decide to go with
the above message, consider the patch pre-approved.


-- 

kargl at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kargl at gcc dot gnu dot org


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


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

* [Bug fortran/24807] Fortran supports real*16, but not complex*32
  2005-11-11 18:19 [Bug fortran/24807] New: Fortran supports real*16, but not complex*32 schnetter at aei dot mpg dot de
                   ` (4 preceding siblings ...)
  2005-11-19 14:51 ` kargl at gcc dot gnu dot org
@ 2005-11-19 19:38 ` schnetter at aei dot mpg dot de
  2005-11-22  8:24 ` fxcoudert at gcc dot gnu dot org
  2005-12-02  1:27 ` kargl at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: schnetter at aei dot mpg dot de @ 2005-11-19 19:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from schnetter at aei dot mpg dot de  2005-11-19 19:38 -------
Created an attachment (id=10295)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10295&action=view)
Patch with better error messach

I've change the error message so that it doesn't use the expression "kind"
where it shouldn't.  I also changed the other error message that is a few lines
further down in the same way.


-- 

schnetter at aei dot mpg dot de changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #10219|0                           |1
        is obsolete|                            |


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


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

* [Bug fortran/24807] Fortran supports real*16, but not complex*32
  2005-11-11 18:19 [Bug fortran/24807] New: Fortran supports real*16, but not complex*32 schnetter at aei dot mpg dot de
                   ` (5 preceding siblings ...)
  2005-11-19 19:38 ` schnetter at aei dot mpg dot de
@ 2005-11-22  8:24 ` fxcoudert at gcc dot gnu dot org
  2005-12-02  1:27 ` kargl at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2005-11-22  8:24 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from fxcoudert at gcc dot gnu dot org  2005-11-22 08:24 -------
(In reply to comment #6)
> I've change the error message so that it doesn't use the expression "kind"
> where it shouldn't.  I also changed the other error message that is a few lines
> further down in the same way.

Approved. Please commit on 4.0, 4.1 and 4.2.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2005-11-19 00:14:42         |2005-11-22 08:24:30
               date|                            |


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


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

* [Bug fortran/24807] Fortran supports real*16, but not complex*32
  2005-11-11 18:19 [Bug fortran/24807] New: Fortran supports real*16, but not complex*32 schnetter at aei dot mpg dot de
                   ` (6 preceding siblings ...)
  2005-11-22  8:24 ` fxcoudert at gcc dot gnu dot org
@ 2005-12-02  1:27 ` kargl at gcc dot gnu dot org
  7 siblings, 0 replies; 9+ messages in thread
From: kargl at gcc dot gnu dot org @ 2005-12-02  1:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from kargl at gcc dot gnu dot org  2005-12-02 01:27 -------
Patch applied.


-- 

kargl at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2005-12-02  1:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-11 18:19 [Bug fortran/24807] New: Fortran supports real*16, but not complex*32 schnetter at aei dot mpg dot de
2005-11-11 19:05 ` [Bug fortran/24807] " schnetter at aei dot mpg dot de
2005-11-11 19:06 ` schnetter at aei dot mpg dot de
2005-11-19  0:14 ` fxcoudert at gcc dot gnu dot org
2005-11-19  1:16 ` schnetter at aei dot mpg dot de
2005-11-19 14:51 ` kargl at gcc dot gnu dot org
2005-11-19 19:38 ` schnetter at aei dot mpg dot de
2005-11-22  8:24 ` fxcoudert at gcc dot gnu dot org
2005-12-02  1:27 ` 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).