Bug 98661

Summary: Following code crashes beignet compiler
Product: Beignet Reporter: Hugh Perkins <hughperkins2>
Component: BeignetAssignee: Zhigang Gong <zhigang.gong>
Status: RESOLVED INVALID QA Contact:
Severity: blocker    
Priority: medium    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Hugh Perkins 2016-11-09 16:01:55 UTC
Following code crashes beignet compiler:

kernel void _Z8getValuePfS_(char outdata_ref, long outdata_offset, char indata_ref, long indata_offset, local int *scratch, global char *__f1, global char *__f2) {
    global float* v1[1];
    global float* v2[1];
    global char *outdata_;
    global char *indata_;
    switch(outdata_ref) {
        case 0:
            outdata_ = 0;
            break;
        case 1:
            outdata_ = __f1;
            break;
        case 2:
            outdata_ = __f2;
            break;
    };
    switch(indata_ref) {
        case 0:
            indata_ = 0;
            break;
        case 1:
            indata_ = __f1;
            break;
        case 2:
            indata_ = __f2;
            break;
    };
    global float* indata = (global float*)(indata_ + indata_offset);
    global float* outdata = (global float*)(outdata_ + outdata_offset);

    label0:;
    ;
    ;
        v1[0] = outdata;
        v2[0] = indata;
        (&v1[0][0])[0] = ((&v2[0][0])[0]) + 3.0f;
    return;
}
Comment 1 Hugh Perkins 2016-11-10 08:03:15 UTC
This one is a bug, but needs a precise test-case you can run.  Let's close this for now.  I'll open/reopen if/when I have a precise easy-to-run testcase.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.