8000 InlineActions also seems to handle exit statements incorrectly · Issue #2382 · p4lang/p4c · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
InlineActions also seems to handle exit statements incorrectly #2382
Open
@fruffy

Description

@fruffy

I have another instance where there are issues with exit, this time in InlineActions.

control ingress(inout Headers h, inout Meta m, inout standard_metadata_t sm) {
    @name("do_action") action do_action_0(inout bit<8> val_0) {
        val_0 = 8w1;
        exit;
    }
    @name("do_action_ingress") action do_action_ingress_0() {
        do_action_0(h.h.a);
    }
    apply {
        do_action_ingress_0();
    }
}

is converted to

control ingress(inout Headers h, inout Meta m, inout standard_metadata_t sm) {
    @name("do_action_ingress") action do_action_ingress_0() {
        {
            bit<8> val = h.h.a;
            val = 8w1;
            exit;
            h.h.a = val;
        }
    }
    apply {
        do_action_ingress_0();
    }
}

Should I collect all the examples of exit problems in one thread or keep filing individual issues?
inline_actions_exit.p4.txt
inline_actions_exit.stf.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request is a duplicate.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0