<html>
    <head>
      <base href="https://bugs.freedesktop.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - Mesa preprocessor matches if(def)s & endifs incorrectly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107772">bug 107772</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>NEEDINFO
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - Mesa preprocessor matches if(def)s & endifs incorrectly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107772#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_NEEDINFO "
   title="NEEDINFO - Mesa preprocessor matches if(def)s & endifs incorrectly"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=107772">bug 107772</a>
              from <span class="vcard"><a class="email" href="mailto:idr@freedesktop.org" title="Ian Romanick <idr@freedesktop.org>"> <span class="fn">Ian Romanick</span></a>
</span></b>
        <pre>(In reply to Ian Romanick from <a href="show_bug.cgi?id=107772#c1">comment #1</a>)
<span class="quote">> I'll add a piglit test for this.  I cut-and-paste that code into a shader
> (and did 's/[[]ERROR]: [0-9]*: //'), and I get:

> Failed to compile vertex shader bad.vert: 0:30(1): error: syntax error,
> unexpected $end</span >

Which I now realized is due to the shader being empty after preprocessing. 
With the test case below, I cannot reproduce this issue.  I tried a couple
similar things.  Eero: Can you provide a small case that reproduces this?

#version 400 core
#define SV_30    1
#define highp
#define mediump
#define lowp
#define TYPE_vertex
#define DO_EMISSIVE_AND_AMBIENT 0
#define NUM_COLORS 64
#define NUM_LIGHTS 16
#ifdef TYPE_fragment
#if !DO_EMISSIVE_AND_AMBIENT
#define DO_LOOP_ITERATION(i)
#define DO_2_LOOP_ITERATIONS(i)
#define DO_4_LOOP_ITERATIONS(i)
#define DO_6_LOOP_ITERATIONS(i)
#define DO_8_LOOP_ITERATIONS(i)
#define DO_16_LOOP_ITERATIONS(i)
#endif
#if !DO_EMISSIVE_AND_AMBIENT
#endif
#if DO_EMISSIVE_AND_AMBIENT
#else
#endif
#endif
#ifdef TYPE_vertex
#if !DO_EMISSIVE_AND_AMBIENT
#endif
#if !DO_EMISSIVE_AND_AMBIENT
#endif
#endif

void main()
{
}</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>