------- Comment #1 from dominiq at lps dot ens dot fr 2008-01-19 17:21 -------
Some debuging (this as fas as I can go on my own):
note the line
5: csym->value = (struct gfc_expr *) warning: Got an error handling event:
"Cannot access memory at
for the case that does not crash.
(gdb) run 1234567.f90
Starting program: /opt/gcc/gcc4.3w/libexec/gcc/i686-apple-darwin9/4.3.0/f951
1234567.f90
Reading symbols for shared libraries +++++. done
1234567.f90:6.13:
block data bd
1
Error: Unexpected BLOCK DATA statement at (1)
1234567.f90:7.10:
common c
1
Error: Unexpected COMMON statement at (1)
1234567.f90:8.3:
end block data bd
1
Error: Expecting END PROGRAM statement at (1)
1234567.f90:10.14:
common /a_t/ c
1
Error: Unexpected COMMON statement at (1)
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xc000004f
resolve_common_vars (sym=<value temporarily unavailable, due to optimizations>,
named_common=1 '\001') at ../../gcc-4.3-work/gcc/fortran/resolve.c:657
657 if (csym->value || csym->attr.data)
(gdb) b 655
Breakpoint 1 at 0x62f0e: file ../../gcc-4.3-work/gcc/fortran/resolve.c, line
655.
(gdb) b 657
Breakpoint 2 at 0x62f47: file ../../gcc-4.3-work/gcc/fortran/resolve.c, line
657.
(gdb) display csym->value
Disabling display 1 to avoid infinite recursion.
1: csym->value = (struct gfc_expr *) Cannot access memory at address 0xc000004f
(gdb) run 1234567.f90
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /opt/gcc/gcc4.3w/libexec/gcc/i686-apple-darwin9/4.3.0/f951
1234567.f90
1234567.f90:6.13:
block data bd
1
Error: Unexpected BLOCK DATA statement at (1)
1234567.f90:7.10:
common c
1
Error: Unexpected COMMON statement at (1)
1234567.f90:8.3:
end block data bd
1
Error: Expecting END PROGRAM statement at (1)
1234567.f90:10.14:
common /a_t/ c
1
Error: Unexpected COMMON statement at (1)
Breakpoint 1, resolve_common_vars (sym=0x40d06d80, named_common=0 '\0') at
../../gcc-4.3-work/gcc/fortran/resolve.c:655
655 for (; csym; csym = csym->common_next)
(gdb) display csym->value
Disabling display 2 to avoid infinite recursion.
2: csym->value = (struct gfc_expr *) Cannot access memory at address 0x4c
(gdb) c
Continuing.
Breakpoint 2, resolve_common_vars (sym=<value temporarily unavailable, due to
optimizations>, named_common=0 '\0') at
../../gcc-4.3-work/gcc/fortran/resolve.c:657
657 if (csym->value || csym->attr.data)
(gdb) display csym->value
3: csym->value = (struct gfc_expr *) 0x0
(gdb) c
Continuing.
Breakpoint 1, resolve_common_vars (sym=0x40d06f50, named_common=1 '\001') at
../../gcc-4.3-work/gcc/fortran/resolve.c:655
655 for (; csym; csym = csym->common_next)
Disabling display 3 to avoid infinite recursion.
3: csym->value = (struct gfc_expr *) warning: Got an error handling event:
"Cannot access memory at address 0x4c".
(gdb) c
Continuing.
Breakpoint 2, resolve_common_vars (sym=<value temporarily unavailable, due to
optimizations>, named_common=1 '\001') at
../../gcc-4.3-work/gcc/fortran/resolve.c:657
657 if (csym->value || csym->attr.data)
(gdb) c
Continuing.
Breakpoint 2, resolve_common_vars (sym=<value temporarily unavailable, due to
optimizations>, named_common=1 '\001') at
../../gcc-4.3-work/gcc/fortran/resolve.c:657
657 if (csym->value || csym->attr.data)
(gdb) display csym->value
Disabling display 4 to avoid infinite recursion.
4: csym->value = (struct gfc_expr *) Cannot access memory at address 0xc000004f
(gdb) c
Continuing.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0xc000004f
resolve_common_vars (sym=<value temporarily unavailable, due to optimizations>,
named_common=1 '\001') at ../../gcc-4.3-work/gcc/fortran/resolve.c:657
657 if (csym->value || csym->attr.data)
(gdb) run 1234567890a.f90
The program being debugged has been started already.
Start it from the beginning? (y or n) y
Starting program: /opt/gcc/gcc4.3w/libexec/gcc/i686-apple-darwin9/4.3.0/f951
1234567890a.f90
1234567890a.f90:6.13:
block data bd
1
Error: Unexpected BLOCK DATA statement at (1)
1234567890a.f90:7.10:
common c
1
Error: Unexpected COMMON statement at (1)
1234567890a.f90:8.3:
end block data bd
1
Error: Expecting END PROGRAM statement at (1)
1234567890a.f90:10.14:
common /a_t/ c
1
Error: Unexpected COMMON statement at (1)
Breakpoint 1, resolve_common_vars (sym=0x40d06d90, named_common=0 '\0') at
../../gcc-4.3-work/gcc/fortran/resolve.c:655
655 for (; csym; csym = csym->common_next)
(gdb) c
Continuing.
Breakpoint 2, resolve_common_vars (sym=<value temporarily unavailable, due to
optimizations>, named_common=0 '\0') at
../../gcc-4.3-work/gcc/fortran/resolve.c:657
657 if (csym->value || csym->attr.data)
(gdb) display csym->value
5: csym->value = (struct gfc_expr *) 0x0
(gdb) c
Continuing.
Breakpoint 1, resolve_common_vars (sym=0x40d06f20, named_common=1 '\001') at
../../gcc-4.3-work/gcc/fortran/resolve.c:655
655 for (; csym; csym = csym->common_next)
Disabling display 5 to avoid infinite recursion.
5: csym->value = (struct gfc_expr *) warning: Got an error handling event:
"Cannot access memory at address 0x4c".
(gdb) c
Continuing.
Breakpoint 2, resolve_common_vars (sym=<value temporarily unavailable, due to
optimizations>, named_common=1 '\001') at
../../gcc-4.3-work/gcc/fortran/resolve.c:657
657 if (csym->value || csym->attr.data)
(gdb) c
Continuing.
Execution times (seconds)
parser : 0.00 ( 0%) usr 0.01 (100%) sys 32.42 (100%) wall
248 kB (70%) ggc
TOTAL : 0.01 0.01 32.42
354 kB
Extra diagnostic checks enabled; compiler may run slowly.
Configure with --enable-checking=release to disable checks.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34858