https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85340
Bug ID: 85340 Summary: allocate_deferred_char_scalar_1.f03 dereferences null pointer Product: gcc Version: 8.0.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: testsuite Assignee: unassigned at gcc dot gnu.org Reporter: zeccav at gmail dot com Target Milestone: --- Testsuite program allocate_deferred_char_scalar_1.f03 at lines 68 and 69 dereferences pointer str4 which was nullified at line 66. Same at lines 39 and 40. This is wrong and should be detected by -fcheck=pointer option. Putting "if(!s1) runtime_error ("Dereferencing null pointer");" before line 90 of libgfortran/intrinsics/string_intrinsics_inc.c detects the bugs at lines 68 and 39. On trunk 259205.