<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 - 'write' may be used uninitialized in fs_visitor::emit_repclear_shader"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=85260">85260</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>'write' may be used uninitialized in fs_visitor::emit_repclear_shader
          </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>Drivers/DRI/i965
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>jason@jlekstrand.net
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>idr@freedesktop.org
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>intel-3d-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>idr@freedesktop.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>GCC generates the following warning:

brw_fs.cpp: In member function 'void fs_visitor::emit_repclear_shader()':
brw_fs.cpp:2613:21: warning: 'write' may be used uninitialized in this function
[-Wmaybe-uninitialized]

In fact, if key->nr_color_regions is 0, this will occur.  It is possible to
have a fragment shader that does not explicit write the framebuffer.  For
example, it could just generate output via atomics.  In the future, a fragment
shader could also just use image stores.

If the key->nr_color_regions == 0 case cannot occur, the code should document
the reason, and we should add an 'assume(key->nr_color_regions > 1)' before the
for-loop.</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>