https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63529
--- Comment #4 from russelldub at gmail dot com --- > With ifort, are you compiling with whatever flag enforces > standards conformance. I need to go hunting through the > standard to see if assumed size arrays are allowed in the > declaration section of a module. > I don't think so. Need to check and see if any of the flags affect it. > >> Which operating system? It compiles and executes for me on > >> x86_64-*-freebsd with 5.0, 4.9.3, and 4.8.something. > > > > RHEL derivative on x86_64, tried 4.4.6, 4.6.1, 4.7.1, 4.8.2, > > and 4.9.0. No ICE on Fedora 20 x86_64 with gcc-4.8.3. Can try > > my Ubuntu laptop later if necessary. > > Hmmm, this smells like a 'used after free' issue. Do you > have valgrind on the system where the failure occurs? That > might point at the smoking gun. I get the ICE on Ubuntu 13.04, gcc-4.8. Valgrind doesn't tell me anything: $ valgrind gfortran -fcray-pointer cray_ptr_error2.f90 ==6319== Memcheck, a memory error detector ==6319== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==6319== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info ==6319== Command: gfortran -fcray-pointer cray_ptr_error.f90 ==6319== f951: internal compiler error: backend decl for module variable ptr1 already exists Please submit a full bug report, with preprocessed source if appropriate. See <file:///usr/share/doc/gcc-4.8/README.Bugs> for instructions. ==6319== ==6319== HEAP SUMMARY: ==6319== in use at exit: 41,057 bytes in 88 blocks ==6319== total heap usage: 194 allocs, 106 frees, 50,830 bytes allocated ==6319== ==6319== LEAK SUMMARY: ==6319== definitely lost: 5,169 bytes in 33 blocks ==6319== indirectly lost: 16 bytes in 1 blocks ==6319== possibly lost: 0 bytes in 0 blocks ==6319== still reachable: 35,872 bytes in 54 blocks ==6319== suppressed: 0 bytes in 0 blocks ==6319== Rerun with --leak-check=full to see details of leaked memory ==6319== ==6319== For counts of detected and suppressed errors, rerun with: -v ==6319== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)