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

            Bug ID: 118745
           Summary: UBSAN: member access within null pointer of type
                    'struct gfc_omp_namelist' since
                    r15-7285-gbea86e82146b9b
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jamborm at gcc dot gnu.org
                CC: burnus at gcc dot gnu.org
            Blocks: 63426
  Target Milestone: ---
              Host: x86_64-linux-gnu
            Target: x86_64-linux-gnu

With UBSAN instrumented compiler (revision 75ab30f77f6), compiling the
testcase gfortran.dg/gomp/dispatch-11.f90 at -O fails with:

 
/home/worker/buildworker/tiber-gcc-ubsan/build/gcc/fortran/trans-openmp.cc:8842:15:
runtime error: member access within null pointer of type 'struct
gfc_omp_namelist'

To configure the compiler with UBSAN, bootstrap it with option
--with-build-config=bootstrap-ubsan (we also only do release checking).

I have bisected the failure to r15-7285-gbea86e82146b9b:

bea86e82146b9b3655e8073eef37723832862ed4 is the first bad commit
commit bea86e82146b9b3655e8073eef37723832862ed4
Author: Tobias Burnus <tbur...@baylibre.com>
Date:   Thu Jan 30 11:28:50 2025 +0100

    OpenMP: append_args clause fixes + Fortran support

    This fixes a large number of smaller and larger issues with the append_args
    clause to 'declare variant' and adds Fortran support for it; it also
contains
    a larger number of testcases.

    In particular, for Fortran, it also handles passing allocatable, pointer,
    optional arguments to an interop dummy argument with or without value
    attribute.  And it changes the internal representation such that dumping
the
    tree does not lead to an ICE.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63426
[Bug 63426] [meta-bug] Issues found with -fsanitize=undefined

Reply via email to