DW_OP_GNU_uninit emitted with -gstrict-dwarf

Stephen Illingworth via Gcc <[email protected]>
Newsgroups gmane.comp.gcc.devel
Message-ID <CAEyVarHYT=o+xyA4snHmSgS3A+YBz=DO2ZtOAe7uat3sY2WfHw@mail.gmail.com>
Is the presence of DW_OP_GNU_uninit in an object file compiled with
-gstrict-dwarf correct?

I am using the arm-none-eabi toolchain and compiling with the following:

arm-none-eabi-gcc -r -mlong-calls -fno-exceptions -march=armv6-m \
-O2 -Wall \
-g3 -gdwarf-4 -gstrict-dwarf \
-c main.c


Inspecting the object file with readelf:

arm-none-eabi-readelf --debug-dump=loc main.o | grep -i 'DW_OP_GNU_'

I see DW_OP_GNU_uninit:

    00004a65 00000e00 00000e42 (DW_OP_reg1 (r1); DW_OP_GNU_uninit)
    00004a71 00000e4c 00000e4e (DW_OP_reg1 (r1); DW_OP_GNU_uninit)
    00004a7d 00000e52 00000e98 (DW_OP_reg1 (r1); DW_OP_GNU_uninit)
    00004a89 00000eca 00000ed9 (DW_OP_reg1 (r1); DW_OP_GNU_uninit)

There are no other GNU operators in the object file. Given that the
'-gstrict-dwarf' has been specified I don't expect DW_OP_GNU_uninit to be
emitted. Is this current behaviour correct? Am I doing something wrong?

Version information:

arm-none-eabi-gcc (Arm GNU Toolchain 15.3.Rel1 (Build arm-15.149)) 15.3.1
20260627
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


I can provide a link to the source if required.

Thanks,
Stephen Illingworth
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.