public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/65825] New: Cannot change attributes intrinsic
@ 2015-04-21 8:39 roger.ferrer at bsc dot es
2015-04-21 9:03 ` [Bug fortran/65825] " dominiq at lps dot ens.fr
2015-04-21 9:25 ` roger.ferrer at bsc dot es
0 siblings, 2 replies; 3+ messages in thread
From: roger.ferrer at bsc dot es @ 2015-04-21 8:39 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65825
Bug ID: 65825
Summary: Cannot change attributes intrinsic
Product: gcc
Version: 4.9.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: roger.ferrer at bsc dot es
Hi,
a problem similar to PR57141 happens with the code below.
Fails both with gfortran 4.9.2 and 5.0.1 20150412 (prerelease).
Both Intel Fortran 14.0.2 and XL Fortran 15.01 accept this code (both print 3
of course).
-- t.f90
MODULE moo
IMPLICIT NONE
INTEGER(4), PUBLIC :: c(3, 3)
!! uncomment the following statement
!! as a workaround
! PRIVATE :: ubound
DATA c(3, 1:ubound(c, 2)) / 1, 2, 3 /
END MODULE moo
PROGRAM main
USE moo
IMPLICIT NONE
INTEGER(4) :: x
INTRINSIC :: ubound ! gfortran rejects this
x = ubound(c, 2)
! should print 3
PRINT *, x
END PROGRAM main
-- end of t.f90
Leaving the upper bound of the subscript-triplet can be used as a workaround.
Another workaround involves explicitly stating that ubound name is private.
I assume that the code is OK since in both cases ubound does not change its
"intrinsic" meaning.
Kind regards,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-04-21 9:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-21 8:39 [Bug fortran/65825] New: Cannot change attributes intrinsic roger.ferrer at bsc dot es
2015-04-21 9:03 ` [Bug fortran/65825] " dominiq at lps dot ens.fr
2015-04-21 9:25 ` roger.ferrer at bsc dot es
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).