<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - Wrong "error: cannot jump from this indirect goto statement to one of its possible targets""
   href="https://llvm.org/bugs/show_bug.cgi?id=27645">27645</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Wrong "error: cannot jump from this indirect goto statement to one of its possible targets"
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

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

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>-New Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>cherepan@mccme.ru
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Source code:

----------------------------------------------------------------------
int main()
{
  void *p = &&first;
  goto *p;

 first:;

  int n = 1;
  char a[n];

  void *q = &&second;
  goto *q;

 second:;
}
----------------------------------------------------------------------

Results:

----------------------------------------------------------------------
$ clang -std=gnu11 test.c && ./a.out
test.c:4:3: error: cannot jump from this indirect goto statement to one of its
possible targets
  goto *p;
  ^
test.c:14:2: note: possible target of indirect goto statement
 second:;
 ^
test.c:9:8: note: jump bypasses initialization of variable length array
  char a[n];
       ^
1 error generated.
----------------------------------------------------------------------

clang version: clang version 3.9.0 (trunk 268228)

The source code is safe and the clang error is wrong. OTOH my testcase is
artificial and maybe better analysis just doesn't worth the trouble.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>