<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - "0[2]" as function parameter hits assert"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107550">107550</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"0[2]" as function parameter hits assert
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Mesa
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Other
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>glsl-compiler
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>mesa-dev@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>karolherbst@gmail.com
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=141050" name="attach_141050" title="shader.frag">attachment 141050</a> <a href="attachment.cgi?id=141050&action=edit" title="shader.frag">[details]</a></span>
shader.frag

gdb output:

glsl_compiler: ../src/compiler/glsl/ir.cpp:1094: ir_constant*
ir_constant::get_array_element(unsigned int) const: Assertion
`this->type->is_array()' failed.

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50        return ret;
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff6cc45c1 in __GI_abort () at abort.c:79
#2  0x00007ffff6cc4491 in __assert_fail_base (fmt=0x7ffff6e27248 "%s%s%s:%u:
%s%sAssertion `%s' failed.\n%n", assertion=0x545a54 "this->type->is_array()",
file=0x544b92 "../src/compiler/glsl/ir.cpp", 
    line=1094, function=0x546a20 <ir_constant::get_array_element(unsigned int)
const::__PRETTY_FUNCTION__> "ir_constant*
ir_constant::get_array_element(unsigned int) const") at assert.c:92
#3  0x00007ffff6cd2752 in __GI___assert_fail (assertion=0x545a54
"this->type->is_array()", file=0x544b92 "../src/compiler/glsl/ir.cpp",
line=1094, 
    function=0x546a20 <ir_constant::get_array_element(unsigned int)
const::__PRETTY_FUNCTION__> "ir_constant*
ir_constant::get_array_element(unsigned int) const") at assert.c:101
#4  0x0000000000464d60 in ir_constant::get_array_element (this=0xc24390, i=2)
at ../src/compiler/glsl/ir.cpp:1094
#5  0x00000000004610ad in ir_dereference_array::constant_expression_value
(this=0xc245f0, mem_ctx=0x7de6e0, variable_context=0x0) at
../src/compiler/glsl/ir_constant_expression.cpp:831
#6  0x00000000004ec22a in process_parameters (instructions=0xc24300,
actual_parameters=0x7fffffffd5f0, parameters=0x7df9c8, state=0x7de6e0) at
../src/compiler/glsl/ast_function.cpp:53
#7  0x00000000004f2bc7 in ast_function_expression::hir (this=0x7df970,
instructions=0xc24300, state=0x7de6e0) at
../src/compiler/glsl/ast_function.cpp:2339
#8  0x00000000004f541d in ast_function_expression::hir_no_rvalue
(this=0x7df970, instructions=0xc24300, state=0x7de6e0) at
../src/compiler/glsl/ast_to_hir.cpp:1089
#9  0x00000000004f9102 in ast_expression_statement::hir (this=0x7dfbb0,
instructions=0xc24300, state=0x7de6e0) at
../src/compiler/glsl/ast_to_hir.cpp:2227
#10 0x00000000004f9175 in ast_compound_statement::hir (this=0x7dfbf0,
instructions=0xc24300, state=0x7de6e0) at
../src/compiler/glsl/ast_to_hir.cpp:2243
#11 0x0000000000501631 in ast_function_definition::hir (this=0x7dfc50,
instructions=0x7e2ee0, state=0x7de6e0) at
../src/compiler/glsl/ast_to_hir.cpp:6191
#12 0x00000000004f3628 in _mesa_ast_to_hir (instructions=0x7e2ee0,
state=0x7de6e0) at ../src/compiler/glsl/ast_to_hir.cpp:156
#13 0x0000000000452ea8 in _mesa_glsl_compile_shader (ctx=0x7ab1c0
<standalone_compile_shader::local_ctx>, shader=0x7dc5b0, dump_ast=false,
dump_hir=false, force_recompile=true)
    at ../src/compiler/glsl/glsl_parser_extras.cpp:2119
#14 0x00000000004053c6 in compile_shader (ctx=0x7ab1c0
<standalone_compile_shader::local_ctx>, shader=0x7dc5b0) at
../src/compiler/glsl/standalone.cpp:394
#15 0x0000000000405915 in standalone_compile_shader (_options=0x7ab170
<options>, num_files=1, files=0x7fffffffdc70) at
../src/compiler/glsl/standalone.cpp:504
#16 0x0000000000404738 in main (argc=4, argv=0x7fffffffdc58) at
../src/compiler/glsl/main.cpp:95</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the QA Contact for the bug.</li>
      </ul>
    </body>
</html>