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

            Bug ID: 124541
           Summary: [ARM - gcc/config/arm/arm.cc - output_move_double()]
                    de-reference of a pointer without checking it might be
                    NULL
           Product: gcc
           Version: 13.2.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: Visda.vokhshoori at microchip dot com
  Target Milestone: ---

I have come across this code in arm.cc by visual inspection.

At the moment I don't have a test case that hits this line of the gcc code.

This is on GCC version 13.2.1.

This bug still exists on the trunk.
https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=gcc/config/arm/arm.cc;h=24a57c687787c49460ca173bd953182364bd9363;hb=HEAD#l20129


the function is called from arm.md, ldrdstrd.md, neon.md, vfp.md and iwmmxt.md
passing NULL for the last parameter to output_move_double ( rtx *, bool, int)

the condition 
if (code0 == REG && code1 != MEM)
 {
20128       gcc_assert (!emit);
20129       *count = 2;
20130       return "";
  }

a few lines above count is checked for being NULL before being assigned a
value.

Reply via email to