https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102903

            Bug ID: 102903
           Summary: Invalid gfortran.dg testcases or wrong-code with
                    -fcheck=all -fsanitize=undefined
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: burnus at gcc dot gnu.org
  Target Milestone: ---

With -fcheck=all -fsanitize=undefined the following shows up

* Possibly okay (invalid on purpose)
* Possibly a testcase bug
* Possibly a code gen bug

====== PR95214.f90 ======
At line 69 of file PR95214.f90
Fortran runtime error: Actual string length does not match the declared one for
dummy argument 'x' (1/77)

====== PR95331.f90 ======
PR95331.f90:137:7: runtime error: load of misaligned address 0x7ffcb894801c for
type '<unknown>', which requires 8 byte alignment
0x7ffcb894801c: note: pointer points here
  2b 00 00 00 2c 00 00 00  2d 00 00 00 2e 00 00 00  2f 00 00 00 30 00 00 00  31
00 00 00 32 00 00 00
              ^ 

====== alloc_comp_class_5.f03 ======
alloc_comp_class_5.f03:26:57: runtime error: load of misaligned address
0x7ffea4a0384f for type '<unknown>', which requires 8 byte alignment
0x7ffea4a0384f: note: pointer points here
 00 00 00 00 66  6f 6f 62 61 72 62 61 7a  00 00 00 00 00 00 00 00  d0 27 cc 01
00 00 00 00  ff ff ff
             ^ 

====== alloc_comp_constructor_6.f90 ======
alloc_comp_constructor_6.f90:26:25: runtime error: signed integer overflow:
5095827452369516032 * 2 cannot be represented in type 'integer(kind=8)'


====== allocate_with_source_8.f08 ======
allocate_with_source_8.f08:87:28: runtime error: load of misaligned address
0x7ffc8ce71bc2 for type '<unknown>', which requires 8 byte alignment
0x7ffc8ce71bc2: note: pointer points here
 00 00  00 00 66 6f 6f 62 61 72  04 00 00 00 cd cc 8c 3f  cd cc 0c 40 04 00 00
00  cd cc 8c 3f cd cc
              ^ 

====== alloc_comp_class_5.f03 ======
alloc_comp_class_5.f03:26:57: runtime error: load of misaligned address
0x7ffea4a0384f for type '<unknown>', which requires 8 byte alignment
0x7ffea4a0384f: note: pointer points here
 00 00 00 00 66  6f 6f 62 61 72 62 61 7a  00 00 00 00 00 00 00 00  d0 27 cc 01
00 00 00 00  ff ff ff
             ^ 

====== assumed_type_13.f90 ======
assumed_type_13.f90:63:6: runtime error: load of misaligned address
0x00000040b4c2 for type '<unknown>', which requires 8 byte alignment
0x00000040b4c2: note: pointer points here
 02 00  03 00 01 00 02 00 03 00  01 00 02 00 03 00 00 00  44 08 00 00 ff 0f 00
00  00 00 00 00 01 00
              ^ 

====== auto_char_dummy_array_1.f90 ======
At line 34 of file auto_char_dummy_array_1.f90
Fortran runtime error: Actual string length does not match the declared one for
dummy argument 'p' (12/0)


====== class_array_20.f03 ======
class_array_20.f03:44:8: runtime error: load of null pointer of type 'struct
foo'
class_array_20.f03:45:8: runtime error: load of null pointer of type 'struct
foo'


====== missing_optional_dummy_6.f90 ======
missing_optional_dummy_6.f90:21:29: runtime error: load of null pointer of type
'integer(kind=4)'

====== mvbits_1.f90 ======
mvbits_1.f90:15:29: runtime error: negation of -128 cannot be represented in
type 'integer(kind=1)'; cast to an unsigned type to negate this value to itself
mvbits_1.f90:15:29: runtime error: signed integer overflow: -128 - 1 cannot be
represented in type 'integer(kind=1)'
mvbits_1.f90:22:29: runtime error: negation of -32768 cannot be represented in
type 'integer(kind=2)'; cast to an unsigned type to negate this value to itself


====== optional_absent_5.f90 ======
optional_absent_5.f90:11:39: runtime error: load of null pointer of type
'logical(kind=4)'
optional_absent_5.f90:11:39: runtime error: member access within null pointer
of type 'struct array02_logical(kind=4)'
optional_absent_5.f90:25:42: runtime error: load of null pointer of type
'logical(kind=4)'

====== power_8.f90 ======
power_8.f90:36:9: runtime error: signed integer overflow: -128 * -1 cannot be
represented in type 'integer(kind=1)'
power_8.f90:61:9: runtime error: signed integer overflow: -9223372036854775808
* -1 cannot be represented in type 'integer(kind=8)'

====== pr17143.f90 ======
pr17143.f90:10:19: runtime error: signed integer overflow: 4611686018427387904
* 2 cannot be represented in type 'integer(kind=8)'


====== pr86328.f90 ======
pr86328.f90:41:37: runtime error: member access within null pointer of type
'struct __vtype__STAR'

====== pr17143.f90 ======
pr17143.f90:10:19: runtime error: signed integer overflow: 4611686018427387904
* 2 cannot be represented in type 'integer(kind=8)'

====== random_7.f90 ======
random_7.f90:22:36: runtime error: load of null pointer of type
'integer(kind=4)'
random_7.f90:22:36: runtime error: load of null pointer of type
'integer(kind=4)'

====== select_type_49.f90 ======
select_type_49.f90:13:26: runtime error: load of misaligned address
0x7ffcda81240c for type '<unknown>', which requires 8 byte alignment
0x7ffcda81240c: note: pointer points here
  0e 00 00 00 00 00 00 80  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  00
11 40 00 00 00 00 00

Reply via email to