Skip to content
Snippets Groups Projects
  • Iain Buclaw's avatar
    46c4be98
    d: Fix closure fields don't get same alignment as local variable [PR109144] · 46c4be98
    Iain Buclaw authored
    Local variables with both non-local references and explicit alignment
    did not propagate their alignment to either the closure field or closure
    frame type, resulting in the closure being misaligned. This is now
    correctly set-up when building the frame type.
    
    	PR d/109144
    
    gcc/d/ChangeLog:
    
    	* d-codegen.cc (build_frame_type): Set frame field and type alignment.
    
    gcc/testsuite/ChangeLog:
    
    	* gdc.dg/torture/pr109144.d: New test.
    46c4be98
    History
    d: Fix closure fields don't get same alignment as local variable [PR109144]
    Iain Buclaw authored
    Local variables with both non-local references and explicit alignment
    did not propagate their alignment to either the closure field or closure
    frame type, resulting in the closure being misaligned. This is now
    correctly set-up when building the frame type.
    
    	PR d/109144
    
    gcc/d/ChangeLog:
    
    	* d-codegen.cc (build_frame_type): Set frame field and type alignment.
    
    gcc/testsuite/ChangeLog:
    
    	* gdc.dg/torture/pr109144.d: New test.