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

--- Comment #2 from Nick Hudson <skrll at netbsd dot org> ---

yes, it does.

Nick

nick@zoom:~/gcc$ ./inst/bin/hppa--linux-gcc -O2 -fno-delete-null-pointer-checks
-S -o pdc.s pdc.i
nick@zoom:~/gcc$ cat pdc.s
        .LEVEL 1.1
        .text
        .align 4
.globl pdc_init
        .type   pdc_init, @function
pdc_init:
        .PROC
        .CALLINFO FRAME=64,CALLS,SAVE_RP
        .ENTRY
        stw %r2,-20(%r30)
        addil LR'pdc-$global$,%r27
        ldo 64(%r30),%r30
        ldw 0(%r0),%r22
        ldo RR'pdc-$global$(%r1),%r1
        stw %r0,-52(%r30)
        ldi 0,%r23
        stw %r22,0(%r1)
        addil LR'pdcbuf-$global$,%r27
        ldi 2,%r25
        ldo RR'pdcbuf-$global$(%r1),%r24
        ldi 10,%r26
        bb,>=,n %r22,30,.+12
        ldw 2(%r22),%r19
        ldw -2(%r22),%r22
        ble 0(%sr4,%r22)
        copy %r31,%r2
        ldw -84(%r30),%r2
        bv %r0(%r2)
        ldo -64(%r30),%r30
        .EXIT
        .PROCEND
        .size   pdc_init, .-pdc_init
        .comm   pdcbuf,256,64
        .comm   pdc,4,4
        .ident  "GCC: (GNU) 9.0.0 20181112 (experimental)"
nick@zoom:~/gcc$

(In reply to Alexander Monakov from comment #1)
> Isn't simply because the code dereferences a null pointer when assigning to
> 'pdc'? Does it "work" as expected with -fno-delete-null-pointer-checks?

Reply via email to