This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/70959] [6/7 Regression] Invalid type determination due to expression in a type declaration statement


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70959

--- Comment #5 from William Clodius <w.clodius at icloud dot com> ---
1. Maybe the placement of the warning is spurious, but is there any chance it
is actually assigning the type REAL(4) to e18?

2. It sounds as if the logic of arith.c is in an incorrect order. What should
be done is roughly?
Is this a parenthesized expression?
  If yes is the expression comma deliminated?
    If yes is it a single comma delimination?
      If yes is the first part REAL(4)?
        If yes is the second part REAL(4)?
          If yes then it is a COMPLEX(8) expression
        Else the parts are inconsistent in type and might be recognized as an
extension
      Else if no is the first part REAL(8)?
        If yes then is the second part REAL(8) expression
          If yes then it is a COMPLEX(16) expression
        Else the parts are inconsistent in type and might be recognized as an
extension
      Else is the first part another type you want to allow as an extension
        ...
   Else is it a multi comma deliminated expression?
     if yes then a syntax error, unrecognized expression
   Else it is a scalar expression of the type of the "first" expression

3. By the above if it mistakenly recognizing a complex constant  I would expect
it
   to be to a OMPLEX(16) constant. The message reads as if it might be
converting
   the INTEGER(8) to REAL(8) then deciding that it is part of a COMPLEX(8)
constant.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]