Skip to content

Make sure offset(0) is handled correctly #515

Open
@RalfJung

Description

@RalfJung

The offset intrinsic (called inbounds_gep in the codegen_ssa API) is now always defined when the offset is 0, even if the pointer is 0 or dangling.

The GCC backend uses new_array_access to model that; it is important to make sure that if the index is 0, this is never UB.

Metadata

Metadata

Assignees

No one assigned

    Labels

    libgccjitrequires a change in libgccjit

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions