Found this while checking other things:

$ cat test6.f90 
  integer :: foo(3)
  integer :: n
  foo(1) = 17
  foo(2) = 55
  foo(3) = 314
  print *, i, foo
  n = 5
  print *,shape(n)
  print *, n
end
$ gfc test6.f90
[EMAIL PROTECTED] pr31610]$ ./a.out
           0          17          55         314
Segmentation fault

With gdb:

Program received signal SIGSEGV, Segmentation fault.
0x00002aaaaab3a8c2 in shape_4 (ret=<value optimized out>, 
    array=<value optimized out>)
    at ../../../gcc43/libgfortran/generated/shape_i4.c:53
53            ret->data[n * stride] =

Works OK in 4.2,


-- 
           Summary: [4.3 Regression] Segfault in shape given a scalar
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: jvdelisle at gcc dot gnu dot org
  GCC host triplet: x86-64-linux-gnu


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34980

Reply via email to