I keep getting segfaults at (more or less) random places. Moreover, the
segfaults on the same code are different on X86_64 from i686 (in the latter
case, they are less frequent). 
This is probably due to move_alloc not being fully/correctly implemented. 
I see nothing wrong with the attached code (indeed, the library from which this
is extracted compiles and runs fine with NAG and XLF). 

[sfili...@donald bug18]$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gnu46/libexec/gcc/x86_64-unknown-linux-gnu/4.6.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/usr/local/gnu46
--enable-languages=c,c++,fortran
Thread model: posix
gcc version 4.6.0 20100715 (experimental) (GCC) 
[sfili...@donald bug18]$ gfortran -o bug18 bug18.f03  
[sfili...@donald bug18]$ ./bug18
 Ok on move target
 Ok on move source
 Test completed 
Segmentation fault


-- 
           Summary: [OOP] Segfault with allocatable scalars and move_alloc
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: sfilippone at uniroma2 dot it
 GCC build triplet: x86_64-unknown-linux-gnu
  GCC host triplet: x86_64-unknown-linux-gnu
GCC target triplet: x86_64-unknown-linux-gnu


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

Reply via email to