Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slicing a cast crashes in simplifyDefUse #648

Closed
ChrisDodd opened this issue May 22, 2017 · 0 comments
Closed

Slicing a cast crashes in simplifyDefUse #648

ChrisDodd opened this issue May 22, 2017 · 0 comments
Assignees
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.

Comments

@ChrisDodd
Copy link
Contributor

This program:

#include <core.p4>
#include <v1model.p4>

header hdr {
    bit<32> a;
    bit<32> b;
    bit<8> c;
}

#include "arith-skeleton.p4"

control ingress(inout Headers h, inout Meta m, inout standard_metadata_t sm) {
    apply {
        h.h.a[7:0] = ((bit<32>)h.h.c)[7:0];
    }
}

V1Switch(p(), vrfy(), ingress(), egress(), update(), deparser()) main;

crashes with the error

In file: ../frontends/p4/simplifyDefUse.cpp:79
Compiler Bug: no locations known for <Cast>(24117)
mihaibudiu pushed a commit to mihaibudiu/p4c-clone that referenced this issue May 22, 2017
@mihaibudiu mihaibudiu self-assigned this May 22, 2017
@mihaibudiu mihaibudiu added bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed. labels May 22, 2017
ChrisDodd pushed a commit that referenced this issue May 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This behavior is unintended and should be fixed. fixed This topic is considered to be fixed.
Projects
None yet
Development

No branches or pull requests

2 participants