[Bug fortran/69695] slice of an array retains pointer attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69695 Andrew Pinski changed: What|Removed |Added Target Milestone|--- |11.0
[Bug fortran/69695] slice of an array retains pointer attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69695 Andrew Pinski changed: What|Removed |Added Resolution|--- |FIXED Status|NEW |RESOLVED --- Comment #6 from Andrew Pinski --- Fixed. the two testcases added seems to represent the original testcase.
[Bug fortran/69695] slice of an array retains pointer attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69695 Martin Liška changed: What|Removed |Added CC||jrfsousa at gcc dot gnu.org, ||marxin at gcc dot gnu.org Keywords|needs-bisection | --- Comment #5 from Martin Liška --- Fixed with r11-1230-g2ff0f48819c8a7ed.
[Bug fortran/69695] slice of an array retains pointer attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69695 Andrew Pinski changed: What|Removed |Added Known to fail||10.3.0 Known to work||11.1.0 Keywords||needs-bisection --- Comment #4 from Andrew Pinski --- With -fsanitize=address,undefined I only get a leak detection starting in GCC 11. In GCC 10.3.0 I did get: = ==1==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x60400038 at pc 0x00401891 bp 0x7ffd65e9dc40 sp 0x7ffd65e9dc38 READ of size 4 at 0x60400038 thread T0 #0 0x401890 in __point_MOD_ptest /app/example.f90:10 #1 0x4020cf in test /app/example.f90:23 #2 0x4020cf in main /app/example.f90:14 #3 0x7fdbefdea0b2 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x270b2) #4 0x4011fd in _start (/app/output.s+0x4011fd)
[Bug fortran/69695] slice of an array retains pointer attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69695 Mikael Morin changed: What|Removed |Added Keywords|accepts-invalid |wrong-code CC||mikael at gcc dot gnu.org --- Comment #2 from Mikael Morin --- (In reply to Joost VandeVondele from comment #0) > However, the underlying problem is that gfortran doesn't generate a compile > time error, as the array slice is passed to a subroutine that expects a > pointer argument. This seems to be allowed, see 12.5.2.7: If the dummy argument does not have INTENT (IN), the actual argument shall be a pointer. Otherwise, the actual argument shall be a pointer or a valid target for the dummy pointer in a pointer assignment statement. Only the target attribute is required, and a(:,2) has the target attribute. The program is properly rejected with -std=f2003. So this is probably a plain wrong-code bug.
[Bug fortran/69695] slice of an array retains pointer attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69695 --- Comment #3 from Joost VandeVondele --- (In reply to Mikael Morin from comment #2) > This seems to be allowed, see 12.5.2.7: Interesting, so that's a F2008 feature. The Cray compiler indeed gets this right. > So this is probably a plain wrong-code bug. thanks for looking carefully!
[Bug fortran/69695] slice of an array retains pointer attribute
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69695 Dominique d'Humieres changed: What|Removed |Added Status|UNCONFIRMED |NEW Last reconfirmed||2016-02-05 Ever confirmed|0 |1 --- Comment #1 from Dominique d'Humieres --- Confirmed from 4.8 up to trunk (6.0).