Fwd: intrinsic repeat() completely broken (regression)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Fwd: intrinsic repeat() completely broken (regression)

Damian Rouson-4
I'm forwarding the email below for Zaak Beekman, who received the
following error when attempting to send the email to this list:

"Message not delivered
There was a problem delivering your message to [hidden email].
See the technical details below, or try resending in a few minutes.
The response from the remote server was:
552 spam score exceeded threshold"

Damian


---------- Forwarded message ---------
From: Zaak Beekman <[hidden email]>
Date: Tue, Mar 26, 2019 at 9:07 AM
Subject: intrinsic repeat() completely broken (regression)
To: <[hidden email]>
Cc: Damian Rouson <[hidden email]>


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512


Hi All,

I have filed a bug report at
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89830 which seems to be a
serious regression.

There are two main issues:

1. The non-elemental intrinsic string handling function, repeat(),
seems to be completely broken and unusable in most cases. I included a
very trivial reproducer in the bug report.

2. The other problem is that, in the opencoarrays extension module
(see https://github.com/sourceryinstitute/OpenCoarrays/blob/8ceb2ce8912f4f0d5317a6cce248d042b3942280/src/extensions/opencoarrays.F90#L590)
it successfully compiles, however, even when taking measures to create
reproducible builds it still embeds an error message with the full
source directory path into the generated object files:

```
$ cd /Users/ibeekman/Sandbox/OpenCoarrays/build/src/mpi &&
/usr/local/bin/gfortran-8 -DGCC_GE_7 -DGCC_GE_8 -DHAVE_MPI
- - -DMPI_WORKING_MODULE -DPREFIX_NAME=_gfortran_caf_
- - -I/usr/local/Cellar/mpich/3.3/include
- - -I/Users/ibeekman/Sandbox/OpenCoarrays/build/include/OpenCoarrays-2.6.1_GNU-8.3.0
- - -I/Users/ibeekman/Sandbox/OpenCoarrays/src -fno-working-directory -O3
- - -DNDEBUG -O3 -J../../include/OpenCoarrays-2.6.1_GNU-8.3.0 -fPIC
- - -fcoarray=lib -c
/Users/ibeekman/Sandbox/OpenCoarrays/src/extensions/opencoarrays.F90
- - -o CMakeFiles/opencoarrays_mod.dir/__/extensions/opencoarrays.F90.o

$ strings src/mpi/CMakeFiles/opencoarrays_mod.dir/__/extensions/opencoarrays.F90.o

Argument NCOPIES of REPEAT intrinsic is negative (its value is %ld)
At line 590 of file
/Users/ibeekman/Sandbox/OpenCoarrays/src/extensions/opencoarrays.F90
```

Notice that the `-fno-working-directory` flag was passed to GFortran.

Thanks,
Zaak
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEqUSJ2TjLk2Zo+QkRqTznDYAhvQ8FAlyaTekACgkQqTznDYAh
vQ/OYQ/+NHF8wh1syzDB7lZU/+GJXGOXcDClZinLmWs9J+y0EUfHoRBezIV7LKfH
A6EmjCw1GEga0Lm+6JvekW4+mdVdYvs9E415yJte1Vm4ID8ju2muZXo59jc+klVZ
6c11Wl75X5T5qQ8Ibw+/JN+qskCFSEh9dP2Sfbyq+INvAzKCh8rIqQxaUBLjwc+b
VhsCAy9l8y3oPBeBIduL8TQw6PiOqpVi7y8rzOPUSc3WpbERGqQJ2jrwmJLPhyym
8WxBcCxShxqjvAxy6up5drZHGd7E+bmvD/raFYmQxuA6U6HPFQoV1Iu3ltBG/Tte
0GMucOaZ7OqWi501BhSR7Igkk+DbvVxXN8fPdh9OaH0iigrcAm7dpEnccEJdomHF
0Bm6DS2syBy6PZKOqJWIXj16lrMxdl/8hUbz4SXuTqWcPyVDE3i5DktCOvMhXZOr
4yfDiU3GZJQ18FXcAyOCJx8L3Qp8XljFrl4bQbbRxkutk8RJw77ag9iu4yWHDMJE
vq6wThcpPcIp6oCf/iQ86dup+o9G3ZmxVFqrB+L3EBH4fUZDeRpHgYs8MK4xSZMp
eVrD/5QJglLGhRLUCc4evYJU7+avamLvrtfZPb8cFFmqC+bEBajGvlA4bbtDumXi
qLC3MDGz9fHnU5m5C2pv5pcRoCPNLfnZIlpBUxA9koEYuI6BTMI=
=AbGF
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: intrinsic repeat() completely broken (regression)

Steve Kargl
On Tue, Mar 26, 2019 at 09:38:41AM -0700, Damian Rouson wrote:

>
> Hi All,
>
> I have filed a bug report at
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89830 which seems to be a
> serious regression.
>
> There are two main issues:
>
> 1. The non-elemental intrinsic string handling function, repeat(),
> seems to be completely broken and unusable in most cases. I included a
> very trivial reproducer in the bug report.

gfortran's response is appropriate for the code in the PR.

program repeat
  implicit none
  write(*,*) repeat('a',5)
end program

The program name 'repeat' conflicts with the intrinsic routine 'repeat'.

program foo
  implicit none
  write(*,*) repeat('a',5)
end program

The above works as expected.

--
Steve
Reply | Threaded
Open this post in threaded view
|

Re: Fwd: intrinsic repeat() completely broken (regression)

Izaak Beekman-2
Hi All,

Darn, I'm sorry about the bad reproducer code.

FWIW, on macOS I get a much less clear error message: Error: Symbol at
(1) is not appropriate for an expression

I believe the primary issue I was intending to report still exists. I
will create a new issue for that and post it here.


Thanks,
Zaak

Izaak "Zaak" Beekman

===========================================================
HPC Scientist
ParaTools Inc.
1509 16th St, NW
Washington, DC 20036
mobile: (917) 797-3239
email: [hidden email]
pgp public key: https://keybase.io/zbeekman/pgp_keys.asc
pgp fingerprint: 1DB1 B5ED E321 22B2 8E56 810D CB21 118C 92A6 4702
===========================================================

On Tue, Mar 26, 2019 at 1:32 PM Steve Kargl
<[hidden email]> wrote:

>
> On Tue, Mar 26, 2019 at 09:38:41AM -0700, Damian Rouson wrote:
> >
> > Hi All,
> >
> > I have filed a bug report at
> > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89830 which seems to be a
> > serious regression.
> >
> > There are two main issues:
> >
> > 1. The non-elemental intrinsic string handling function, repeat(),
> > seems to be completely broken and unusable in most cases. I included a
> > very trivial reproducer in the bug report.
>
> gfortran's response is appropriate for the code in the PR.
>
> program repeat
>   implicit none
>   write(*,*) repeat('a',5)
> end program
>
> The program name 'repeat' conflicts with the intrinsic routine 'repeat'.
>
> program foo
>   implicit none
>   write(*,*) repeat('a',5)
> end program
>
> The above works as expected.
>
> --
> Steve