[Bug fortran/64613] allocatable array after 4.7

2015-03-31 Thread ql.le at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64613

--- Comment #2 from Quang Linh LE  ---
Actually the problem was because I recompiled vanilla versions of GCC/GDB on
Fedora (I was on Fedora 17 with GCC 4.7). Fedora has long history of patches
for GBD include VLA. After trying serveral times with Archer and other VLA
implement, I gave up. The best way I can suggest to a normal user is grabbing a
new version of Fedora with recent version of GCC and GDB...

Unfortunately, if one is on OS X, I can't find any solution atm.


[Bug fortran/64613] New: allocatable array after 4.7

2015-01-15 Thread ql.le at hotmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64613

Bug ID: 64613
   Summary:  allocatable array after 4.7
   Product: gcc
   Version: 4.9.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: ql.le at hotmail dot com

A small code to test:

```
integer :: x(2,3)
integer, allocatable :: y(:,:)

allocate(y(2,3))

x = reshape([1,2,3,4,5,6], [2,3], order=[2,1])
y = reshape([1,2,3,4,5,6], [2,3], order=[2,1])

print *, 'x', transpose(x)
print *, 'y', transpose(y)

end
```

On 4.7, gdb works fine with both x and y

```
[qlle@(none) ~]$ gdb --version | head -n1
GNU gdb (GDB) Fedora (7.4.50.20120120-54.fc17)
[qlle@(none) ~]$ gfortran --version | head -n1
GNU Fortran (GCC) 4.7.2 20120921 (Red Hat 4.7.2-2)

(gdb) i lo
x = (( 1, 4) ( 2, 5) ( 3, 6) )
y = (( 1, 4) ( 2, 5) ( 3, 6) )
(gdb) p y(:,2)
$1 = (2, 5)
(gdb) p y(2,:)
$2 = (4, 5, 6)
(gdb) show language 
The current source language is "auto; currently fortran".
```

However on 4.9, `` was shown instead:

```
~/Downloads❯ gdb --version | head -n 1
GNU gdb (GDB) 7.8.1

~/Downloads❯ gfortran --version | head -n1
GNU Fortran (Homebrew gcc 4.9.2_1) 4.9.2

~/Downloads❯ gdb a.out
...
(gdb) break 9
Breakpoint 1 at 0x10b41: file alloc.f90, line 9.
run
...
(gdb) info locals
x = (( 1, 4) ( 2, 5) ( 3, 6) )
y = 
```