flang-compiler / f18-llvm-project

Fork of llvm/llvm-project for f18. In sync with f18-mlir and f18.
http://llvm.org
28 stars 16 forks source link

error: No explicit type declared for 'imag' #897

Closed oroppas closed 1 year ago

oroppas commented 3 years ago
           y = imag ( z )

from

https://github.com/QcmPlab/SciFortran/blob/69a9711e21c50d4f2768dfb981cfd21b38f88863/src/SF_SPECIAL/special_functions.f90#L1673

jeanPerier commented 3 years ago

imag is an GNU F77 extension. Currently there is no plan for f18 semantics to support many of these GNU F77 extensions.

klausler commented 3 years ago

Can you use AIMAG(z) or z%im?

oroppas commented 3 years ago

Unfortunately, NWChem and Xfoil also use imag.

klausler commented 3 years ago

Does -Dimag=aimag work around this problem successfully?

oroppas commented 3 years ago

No flang-new doesn't understand -Dimag=aimag.

klausler commented 3 years ago

That's strange; the arm driver is reported to be feature-complete w/r/t f18. Did the arm driver give you an error message?

You might also need a -cpp option.

oroppas commented 3 years ago

Ah. You're absolutely right. We need -cpp.

oroppas commented 1 year ago

Closed as implemented on llvm ToT.