* [Bug fortran/36553] [4.4 Regression] regression due to revision 136821
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
@ 2008-06-17 19:34 ` pault at gcc dot gnu dot org
2008-06-17 22:05 ` dominiq at lps dot ens dot fr
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-06-17 19:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pault at gcc dot gnu dot org 2008-06-17 19:33 -------
(In reply to comment #0)
> At revision 136821 the following code:
Dominique,
It runs fine for me on x86_ia64 - did you use any options?
I've CC'd Jerry, since 136821 was his.
Paul
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jvdelisle at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] [4.4 Regression] regression due to revision 136821
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
2008-06-17 19:34 ` [Bug fortran/36553] " pault at gcc dot gnu dot org
@ 2008-06-17 22:05 ` dominiq at lps dot ens dot fr
2008-06-18 0:19 ` jvdelisle at gcc dot gnu dot org
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens dot fr @ 2008-06-17 22:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from dominiq at lps dot ens dot fr 2008-06-17 22:04 -------
(In reply to comment #1)
> It runs fine for me on x86_ia64 - did you use any options?
I have set the build to i686-apple-darwin9. The bus error comes with default
(-m32 and no options), the test passes with -m64.
--
dominiq at lps dot ens dot fr changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC build triplet| |i686-apple-darwin9
GCC host triplet| |i686-apple-darwin9
GCC target triplet| |i686-apple-darwin9
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] [4.4 Regression] regression due to revision 136821
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
2008-06-17 19:34 ` [Bug fortran/36553] " pault at gcc dot gnu dot org
2008-06-17 22:05 ` dominiq at lps dot ens dot fr
@ 2008-06-18 0:19 ` jvdelisle at gcc dot gnu dot org
2008-06-18 4:28 ` jvdelisle at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-06-18 0:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from jvdelisle at gcc dot gnu dot org 2008-06-18 00:18 -------
I can reproduce this on x86-64-linux by using the -m32 option.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-06-18 00:18:57
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] [4.4 Regression] regression due to revision 136821
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (2 preceding siblings ...)
2008-06-18 0:19 ` jvdelisle at gcc dot gnu dot org
@ 2008-06-18 4:28 ` jvdelisle at gcc dot gnu dot org
2008-06-18 4:57 ` jvdelisle at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-06-18 4:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jvdelisle at gcc dot gnu dot org 2008-06-18 04:27 -------
When I revert just the files in my patch, the test case passes with -m32 and
segfaults on -m64 at run time. I don't think this is related to 136821
directly.
Looking at the -fdump-tree-original between -m32 and -m64, there are a large
number of variables that change from kind=4 with -m32 to kind=8 with -m64.
Something is definitely out of whack.
This is looking like a Hiesenbug. I am going to need help to find this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] [4.4 Regression] regression due to revision 136821
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (3 preceding siblings ...)
2008-06-18 4:28 ` jvdelisle at gcc dot gnu dot org
@ 2008-06-18 4:57 ` jvdelisle at gcc dot gnu dot org
2008-06-18 5:34 ` burnus at gcc dot gnu dot org
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-06-18 4:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2008-06-18 04:57 -------
OK, with r136820
$ gfc -m64 -fbounds-check pr36553.f90
$ ./a.out
At line 17 of file pr36553.f90
Fortran runtime error: Array bound mismatch, size mismatch for dimension 1 of
array 'expected' (0/3329063047920841327)
$ gfc -m32 -fbounds-check pr36553.f90
$ ./a.out
T
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] [4.4 Regression] regression due to revision 136821
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (4 preceding siblings ...)
2008-06-18 4:57 ` jvdelisle at gcc dot gnu dot org
@ 2008-06-18 5:34 ` burnus at gcc dot gnu dot org
2008-06-18 7:16 ` [Bug fortran/36553] Missing interface not detected in call to same file function pault at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-06-18 5:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from burnus at gcc dot gnu dot org 2008-06-18 05:33 -------
I get in valgrind (trunk revision 136838) with -m32 and -m64 on x86-64-linux:
==3145== Invalid read of size 4
==3145== at 0x804876D: check_integer4_rank1_ (test.f90:14)
==3145== by 0x80489E1: MAIN__ (test.f90:29)
==3145== by 0x8048AF8: main (fmain.c:21)
However, this is not different from 4.3. Using NAG f95, I get:
Warning: line 26: REAL value for INTEGER PARAMETER
Error:Explicit interface required for CHECK_INTEGER4_RANK1 from ARRAY_TEST -
argument EXPECTED (no. 1) is an assumed-shape array
And for the contained procedure, I don't see any valgrind errors.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] Missing interface not detected in call to same file function
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (5 preceding siblings ...)
2008-06-18 5:34 ` burnus at gcc dot gnu dot org
@ 2008-06-18 7:16 ` pault at gcc dot gnu dot org
2009-04-10 20:50 ` dfranke at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pault at gcc dot gnu dot org @ 2008-06-18 7:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from pault at gcc dot gnu dot org 2008-06-18 07:15 -------
(In reply to comment #6)
> However, this is not different from 4.3. Using NAG f95, I get:
> Warning: line 26: REAL value for INTEGER PARAMETER
> Error:Explicit interface required for CHECK_INTEGER4_RANK1 from ARRAY_TEST -
> argument EXPECTED (no. 1) is an assumed-shape array
duuuh!
Lahey...
Compiling program unit CHECK_INTEGER4_RANK1 at line 1:
Compiling program unit array_test at line 19:
2615-S: "SOURCE.F90", line 29: The procedure 'CHECK_INTEGER4_RANK1' shall
have an explicit interface, because it contains the assumed shape array
'EXPECTED'. The previous definition is in 'line 14'.
2615-S: "SOURCE.F90", line 29: The procedure 'CHECK_INTEGER4_RANK1' shall
have an explicit interface, because it contains the assumed shape array
'COMPUTED'. The previous definition is in 'line 14'.
Encountered 2 errors, 0 warnings, 0 informations in file SOURCE.F90.
Compiling file SOURCE.F90.
Another case where same file checking would come in handy.
Compiling with -m32 on my system reproduces the bus error. Adding the
interface, thusly:
!module CHECK_SEM
! Submitted by Walt Brainerd, The Fortran Company
! GNU Fortran 95 (GCC 4.1.0 20050322 (experimental))
! Windows XP
! Produces "a.exe has encountered a problem" window.
! Same problem if comments are removed so that
! the function is in a module.
! contains
function CHECK_INTEGER4_RANK1 (EXPECTED, COMPUTED)
integer(4), dimension(:), intent(in) :: EXPECTED, COMPUTED
logical :: CHECK_INTEGER4_RANK1
CHECK_INTEGER4_RANK1 = all(COMPUTED == EXPECTED)
end function CHECK_INTEGER4_RANK1
!end module CHECK_SEM
program array_test
!use CHECK_SEM
logical :: CHECK_INTEGER4_RANK1
integer,dimension(-1:1,-1:1) :: mis1=1
logical,dimension(-1:1,-1:1) :: ml2=.true.
interface
function CHECK_INTEGER4_RANK1 (EXPECTED, COMPUTED)
integer(4), dimension(:), intent(in) :: EXPECTED, COMPUTED
logical :: CHECK_INTEGER4_RANK1
end function CHECK_INTEGER4_RANK1
end interface
print *, CHECK_INTEGER4_RANK1 (sum(mis1,dim=1,mask=ml2), (/8,5,12/))
end program array_test
Makes it work fine for -m32 and -m64.
Dominique, if that does not do it for you, remodify the summary line and
keywords as appropriate.
Cheers
Paul
PS Jerry, sorry for fingering you falsely! :)
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pault at gcc dot gnu dot org
Keywords| |diagnostic, ice-on-invalid-
| |code
Summary|[4.4 Regression] regression |Missing interface not
|due to revision 136821 |detected in call to same
| |file function
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] Missing interface not detected in call to same file function
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (6 preceding siblings ...)
2008-06-18 7:16 ` [Bug fortran/36553] Missing interface not detected in call to same file function pault at gcc dot gnu dot org
@ 2009-04-10 20:50 ` dfranke at gcc dot gnu dot org
2009-04-10 22:41 ` dominiq at lps dot ens dot fr
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-04-10 20:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from dfranke at gcc dot gnu dot org 2009-04-10 20:50 -------
Dominique, any improvements here with -fwhole-file?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] Missing interface not detected in call to same file function
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (7 preceding siblings ...)
2009-04-10 20:50 ` dfranke at gcc dot gnu dot org
@ 2009-04-10 22:41 ` dominiq at lps dot ens dot fr
2010-05-23 19:06 ` dfranke at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-04-10 22:41 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from dominiq at lps dot ens dot fr 2009-04-10 22:41 -------
> Dominique, any improvements here with -fwhole-file?
AFAICT the answer is no: the invalid code in comment #0 is not rejected (see
comment #6 for the kind of expected diagnostic).
I think this PR should be closed as invalid and a new one open against
-fwhole-file with the keyword accept-invalid.
BTW the "ice-on-invalid-code" does not seem correct: the "seg fault" (or "bus
error") occurs at run time depending on the flags (and the revision). Note also
that the result is mostly 'T' when the compiled code is executed (instead if
'F' when the comments for 'module' are removed) .
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] Missing interface not detected in call to same file function
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (8 preceding siblings ...)
2009-04-10 22:41 ` dominiq at lps dot ens dot fr
@ 2010-05-23 19:06 ` dfranke at gcc dot gnu dot org
2010-05-23 22:34 ` dfranke at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-23 19:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from dfranke at gcc dot gnu dot org 2010-05-23 19:06 -------
Still an issue with gcc version 4.6.0 20100520 (experimental) (GCC)
Replaced ice-on-invalid with accepts-invalid keyword. The compiler is fine, the
produced binary isn't - there should be no binary.
Smaller testcase:
real :: f
print *, f( (/ 0.0, 1.0/) )
end
function f(x)
real, intent(in) :: x(:) ! assumed shape requires explicit interface in
caller
real :: f(size(x))
f = sin(x) ! array valued result requires explicit interface
in caller
end function
What bothers me: how are we supposed to determine if an explicit interface
would be required, if the function in questions is in a different compilation
unit? Can -fwhole-program/-flto, or whatever else looks at the whole picture,
tweaked to do that?
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|ice-on-invalid-code |accepts-invalid
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] Missing interface not detected in call to same file function
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (9 preceding siblings ...)
2010-05-23 19:06 ` dfranke at gcc dot gnu dot org
@ 2010-05-23 22:34 ` dfranke at gcc dot gnu dot org
2010-05-24 8:31 ` paul dot richard dot thomas at gmail dot com
2010-05-24 10:44 ` dfranke at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-23 22:34 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from dfranke at gcc dot gnu dot org 2010-05-23 22:34 -------
*** This bug has been marked as a duplicate of 31346 ***
--
dfranke at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] Missing interface not detected in call to same file function
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (10 preceding siblings ...)
2010-05-23 22:34 ` dfranke at gcc dot gnu dot org
@ 2010-05-24 8:31 ` paul dot richard dot thomas at gmail dot com
2010-05-24 10:44 ` dfranke at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: paul dot richard dot thomas at gmail dot com @ 2010-05-24 8:31 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1271 bytes --]
------- Comment #12 from paul dot richard dot thomas at gmail dot com 2010-05-24 08:31 -------
Subject: Re: Missing interface not detected in call to
same file function
With -fwhole-file, we get for the short testcase:
../pr36553/pr36553.f90:2.9:
print *, f( (/ 0.0, 1.0/) )
1
Error: The reference to function 'f' at (1) either needs an explicit
INTERFACE or the rank is incorrect
Paul
On Mon, May 24, 2010 at 12:34 AM, dfranke at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #11 from dfranke at gcc dot gnu dot org 2010-05-23 22:34 -------
>
>
> *** This bug has been marked as a duplicate of 31346 ***
>
>
> --
>
> dfranke at gcc dot gnu dot org changed:
>
> What |Removed |Added
> ----------------------------------------------------------------------------
> Status|NEW |RESOLVED
> Resolution| |DUPLICATE
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
>
> ------- You are receiving this mail because: -------
> You are on the CC list for the bug, or are watching someone who is.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug fortran/36553] Missing interface not detected in call to same file function
2008-06-17 16:44 [Bug fortran/36553] New: [4.4 Regression] regression due to revision 136821 dominiq at lps dot ens dot fr
` (11 preceding siblings ...)
2010-05-24 8:31 ` paul dot richard dot thomas at gmail dot com
@ 2010-05-24 10:44 ` dfranke at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2010-05-24 10:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from dfranke at gcc dot gnu dot org 2010-05-24 10:44 -------
(In reply to comment #12)
> With -fwhole-file, we get for the short testcase:
>
> ../pr36553/pr36553.f90:2.9:
>
> print *, f( (/ 0.0, 1.0/) )
> 1
> Error: The reference to function 'f' at (1) either needs an explicit
> INTERFACE or the rank is incorrect
Argh! How did I miss that?
Ok, if the array valued result is removed, it goes again unnoticed:
real :: f
print *, f( (/ 0.0, 1.0/) )
end
function f(x)
real, intent(in) :: x(:) ! assumed shape requires explicit interface in
caller
real :: f
f = sum(x)
end function
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36553
^ permalink raw reply [flat|nested] 14+ messages in thread