Setting inferred volatile on symbol affected by address-of main::wp = &main::w

CONTROL FLOW GRAPH SSA

void main()
main: scope:[main]  from __start
  main::w = $4d2
  main::vp#0 = ((void *)) main::wp
  main::bp#0 = ((char *)) main::vp#0
  *main::SCREEN = *main::bp#0
  to:main::@return
main::@return: scope:[main]  from main
  return 
  to:@return

void __start()
__start: scope:[__start]  from
  call main
  to:__start::@1
__start::@1: scope:[__start]  from __start
  to:__start::@return
__start::@return: scope:[__start]  from __start::@1
  return 
  to:@return

SYMBOL TABLE SSA
void __start()
void main()
__constant char * const main::SCREEN = (char *)$400
char *main::bp
char *main::bp#0
void *main::vp
void *main::vp#0
__loadstore volatile unsigned int main::w
__constant unsigned int *main::wp = &main::w

Inlining cast main::vp#0 = (void *)main::wp
Inlining cast main::bp#0 = (char *)main::vp#0
Successful SSA optimization Pass2InlineCast
Simplifying constant pointer cast (char *) 1024
Successful SSA optimization PassNCastSimplification
Constant right-side identified [1] main::vp#0 = (void *)main::wp
Successful SSA optimization Pass2ConstantRValueConsolidation
Constant main::vp#0 = (void *)main::wp
Successful SSA optimization Pass2ConstantIdentification
Constant main::bp#0 = (char *)main::vp#0
Successful SSA optimization Pass2ConstantIdentification
Removing unused procedure __start
Removing unused procedure block __start
Removing unused procedure block __start::@1
Removing unused procedure block __start::@return
Successful SSA optimization PassNEliminateEmptyStart
CALL GRAPH

Created 0 initial phi equivalence classes
Coalesced down to 0 phi equivalence classes

FINAL CONTROL FLOW GRAPH

void main()
main: scope:[main]  from
  [0] main::w = $4d2
  [1] *main::SCREEN = *main::bp#0
  to:main::@return
main::@return: scope:[main]  from main
  [2] return 
  to:@return


VARIABLE REGISTER WEIGHTS
void main()
char *main::bp
void *main::vp
__loadstore volatile unsigned int main::w // 20.0

Initial phi equivalence classes
Added variable main::w to live range equivalence class [ main::w ]
Complete equivalence classes
[ main::w ]
Allocated zp[2]:2 [ main::w ]
REGISTER UPLIFT POTENTIAL REGISTERS
Statement [0] main::w = $4d2 [ ] (  [ ] { }  ) always clobbers reg byte a 
Statement [1] *main::SCREEN = *main::bp#0 [ ] (  [ ] { }  ) always clobbers reg byte a 
Potential registers zp[2]:2 [ main::w ] : zp[2]:2 , 

REGISTER UPLIFT SCOPES
Uplift Scope [main] 20: zp[2]:2 [ main::w ] 
Uplift Scope [] 

Uplifting [main] best 26 combination zp[2]:2 [ main::w ] 
Uplifting [] best 26 combination 

ASSEMBLER BEFORE OPTIMIZATION
  // File Comments
// Test simple void pointer (conversion without casting)
  // Upstart
  // Commodore 64 PRG executable file
.file [name="pointer-void-0.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
.segment Code
  // main
main: {
    .label SCREEN = $400
    .label wp = w
    .label vp = wp
    .label bp = vp
    .label w = 2
    // [0] main::w = $4d2 -- vwuz1=vwuc1 
    lda #<$4d2
    sta.z w
    lda #>$4d2
    sta.z w+1
    // [1] *main::SCREEN = *main::bp#0 -- _deref_pbuc1=_deref_pbuc2 
    lda.z bp
    sta SCREEN
    jmp __breturn
    // main::@return
  __breturn:
    // [2] return 
    rts
}
  // File Data

ASSEMBLER OPTIMIZATIONS
Removing instruction jmp __breturn
Succesful ASM optimization Pass5NextJumpElimination
Removing instruction __breturn:
Succesful ASM optimization Pass5UnusedLabelElimination

FINAL SYMBOL TABLE
void main()
__constant char * const main::SCREEN = (char *) 1024
char *main::bp
__constant char *main::bp#0 = (char *)main::vp#0 // bp
void *main::vp
__constant void *main::vp#0 = (void *)main::wp // vp
__loadstore volatile unsigned int main::w // zp[2]:2 20.0
__constant unsigned int *main::wp = &main::w

zp[2]:2 [ main::w ]


FINAL ASSEMBLER
Score: 23

  // File Comments
// Test simple void pointer (conversion without casting)
  // Upstart
  // Commodore 64 PRG executable file
.file [name="pointer-void-0.prg", type="prg", segments="Program"]
.segmentdef Program [segments="Basic, Code, Data"]
.segmentdef Basic [start=$0801]
.segmentdef Code [start=$80d]
.segmentdef Data [startAfter="Code"]
.segment Basic
:BasicUpstart(main)
  // Global Constants & labels
.segment Code
  // main
main: {
    .label SCREEN = $400
    .label wp = w
    .label vp = wp
    .label bp = vp
    .label w = 2
    // word w = 1234
    // [0] main::w = $4d2 -- vwuz1=vwuc1 
    lda #<$4d2
    sta.z w
    lda #>$4d2
    sta.z w+1
    // *SCREEN = *bp
    // [1] *main::SCREEN = *main::bp#0 -- _deref_pbuc1=_deref_pbuc2 
    lda.z bp
    sta SCREEN
    // main::@return
    // }
    // [2] return 
    rts
}
  // File Data

