pawosm-arm wrote:

> 
> It sounds like an issue with the `mpich` build script rather than LLVM Flang. 
> Why would `mpich` and other projects use this flag to begin with? Do other 
> Fortran compilers support it?
>

I don't know why they do that, I suppose they think they know better. I don't 
suspect they are aware of the pain they brought to the users (of various 
Fortran compilers).
 
> From GFrotran docs 
> (https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html):
> 
> > Using this option is strongly discouraged.
> 

As I said, I suppose they think they know better.

> In general, I'm hesitant to allow such dummy flags that:
> 
> * do nothing,
> * are there merely to prevent issues in build scripts.
> 
> Are there no other ways around it? We obviously should make it possible for 
> LLVM Flang to build all projects, but I really want to avoid Flang containing 
> multiple dummy flags only to work around build scripts that assume a 
> particular compiler is used.
> 

The alternative is to instruct the users how to patch the `configure` scripts. 
There is always a trade-off between disgust (caused by introduction of ugly 
flags) and battered user experience (caused by the compiler rejecting a flag 
that someone in some widely used project insisted that should be accepted). We 
could document the problem and describe how to work around it, however we must 
carefully consider the maintenance cost of this extra bit of documentation.

> We might be missing some "gfortran compatibility mode" in Flang (on top of 
> `FlangMode`). Such mode could allow unsupported GFortran flags and warn 
> whenever those are used. `flang-new` would still "default" to `FlangMode` and 
> just generate an error.
> 

Yes, we agreed long time ago that gfortran isn't the gold standard of how the 
Fortran compiler should behave. But the reality always knows it better. And 
things like mpich or netcdf are widely used in the exact environment we want to 
target with our compiler.



https://github.com/llvm/llvm-project/pull/91611
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to