[Bug fortran/47853] New: Assignment of integer to pointer compiles, and a.out segfaults

2011-02-22 Thread thisrod at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47853

   Summary: Assignment of integer to pointer compiles, and a.out
segfaults
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: this...@gmail.com


Created attachment 23438
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23438
Source code to trigger the error

Shell trace:

% gfortran -v test.f08
Driving: gfortran -mmacosx-version-min=10.6.6 -v test.f08 -lgfortran
-shared-libgcc
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin10.3.0/4.5.1/lto-wrapper
Target: x86_64-apple-darwin10.3.0
Configured with: ../gcc-4_5-branch/configure --prefix=/usr/local/gfortran
--enable-languages=c,c++,fortran
--with-gmp=/Users/fx/devel/gcc/ibin45/../irun45 --enable-bootstrap
--with-included-gettext --with-arch=nocona --with-tune=generic
Thread model: posix
gcc version 4.5.1 20100506 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.6.6' '-v' '-shared-libgcc'
'-mtune=generic' '-march=nocona'
 /usr/local/gfortran/libexec/gcc/x86_64-apple-darwin10.3.0/4.5.1/f951 test.f08
-fPIC -quiet -dumpbase test.f08 -mmacosx-version-min=10.6.6 -mtune=generic
-march=nocona -auxbase test -version -fintrinsic-modules-path
/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/4.5.1/finclude -o
/var/folders/9P/9PFGWXR+FHWaXgjuUM4v5U+++TU/-Tmp-//ccQWPLn5.s
GNU Fortran (GCC) version 4.5.1 20100506 (prerelease)
(x86_64-apple-darwin10.3.0)
compiled by GNU C version 4.5.1 20100506 (prerelease), GMP version 4.3.1,
MPFR version 2.4.2-p2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran (GCC) version 4.5.1 20100506 (prerelease)
(x86_64-apple-darwin10.3.0)
compiled by GNU C version 4.5.1 20100506 (prerelease), GMP version 4.3.1,
MPFR version 2.4.2-p2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.6.6' '-v' '-shared-libgcc'
'-mtune=generic' '-march=nocona'
 as -arch x86_64 -force_cpusubtype_ALL -o
/var/folders/9P/9PFGWXR+FHWaXgjuUM4v5U+++TU/-Tmp-//cca9YzEf.o
/var/folders/9P/9PFGWXR+FHWaXgjuUM4v5U+++TU/-Tmp-//ccQWPLn5.s
COMPILER_PATH=/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin10.3.0/4.5.1/:/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin10.3.0/4.5.1/:/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin10.3.0/:/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/4.5.1/:/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/
LIBRARY_PATH=/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/4.5.1/:/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/4.5.1/../../../:/usr/lib/
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.6.6' '-v' '-shared-libgcc'
'-mtune=generic' '-march=nocona'
 /usr/local/gfortran/libexec/gcc/x86_64-apple-darwin10.3.0/4.5.1/collect2
-dynamic -arch x86_64 -macosx_version_min 10.6.6 -weak_reference_mismatches
non-weak -o a.out -lcrt1.10.5.o
-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/4.5.1
-L/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/4.5.1/../../..
/var/folders/9P/9PFGWXR+FHWaXgjuUM4v5U+++TU/-Tmp-//cca9YzEf.o -lgfortran
-lgcc_s.10.5 -lgcc_ext.10.5 -lgcc -no_compact_unwind -lSystem
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.6.6' '-v' '-shared-libgcc'
'-mtune=generic' '-march=nocona'
% ./a.out
21766: signal: sys: segmentation violation


[Bug fortran/47745] New: Gfortran segfaults with class(*) and derived type dummy arguments

2011-02-14 Thread thisrod at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47745

   Summary: Gfortran segfaults with class(*) and derived type
dummy arguments
   Product: gcc
   Version: 4.5.1
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: fortran
AssignedTo: unassig...@gcc.gnu.org
ReportedBy: this...@gmail.com


Created attachment 23346
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=23346
This program crashes the compiler

Attempting to compile the attached source, crashme.f08, does as follows. 
Changing type(T) to integer, or deleting the line add = 1, avoids the
compiler crash.

% gfortran -v -c derived.f08
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/gfortran/libexec/gcc/x86_64-apple-darwin10.3.0/4.5.1/lto-wrapper
Target: x86_64-apple-darwin10.3.0
Configured with: ../gcc-4_5-branch/configure --prefix=/usr/local/gfortran
--enable-languages=c,c++,fortran
--with-gmp=/Users/fx/devel/gcc/ibin45/../irun45 --enable-bootstrap
--with-included-gettext --with-arch=nocona --with-tune=generic
Thread model: posix
gcc version 4.5.1 20100506 (prerelease) (GCC) 
COLLECT_GCC_OPTIONS='-mmacosx-version-min=10.6.6' '-v' '-c' '-mtune=generic'
'-march=nocona'
 /usr/local/gfortran/libexec/gcc/x86_64-apple-darwin10.3.0/4.5.1/f951
derived.f08 -fPIC -quiet -dumpbase derived.f08 -mmacosx-version-min=10.6.6
-mtune=generic -march=nocona -auxbase derived -version -fintrinsic-modules-path
/usr/local/gfortran/lib/gcc/x86_64-apple-darwin10.3.0/4.5.1/finclude -o
/var/folders/9P/9PFGWXR+FHWaXgjuUM4v5U+++TU/-Tmp-//ccOLAgz5.s
GNU Fortran (GCC) version 4.5.1 20100506 (prerelease)
(x86_64-apple-darwin10.3.0)
compiled by GNU C version 4.5.1 20100506 (prerelease), GMP version 4.3.1,
MPFR version 2.4.2-p2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran (GCC) version 4.5.1 20100506 (prerelease)
(x86_64-apple-darwin10.3.0)
compiled by GNU C version 4.5.1 20100506 (prerelease), GMP version 4.3.1,
MPFR version 2.4.2-p2, MPC version 0.8.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
derived.f08:8.23:

class(*), intent(in) :: x
   1
Error: Invalid character in name at (1)
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.