http://llvm.org/bugs/show_bug.cgi?id=10468

           Summary: Variable length arrays crash compiler
           Product: new-bugs
           Version: 2.8
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]


Hardware:  Intel Pentium 4 (32-bit mode)
O.S.:  Linux Fedora Core 15 (32-bit mode)

The following program causes clang to "crash":
/*
 * clang: error: clang frontend command failed due to signal 11 (use -v to see
invocation)
 */

#define LDBL long double

/*****************************************************************/
static void
ld_vla( const int m, const int n, LDBL vla[m][n] ){
  int j, k;

    for( j=0; j<m; j++ ){
      for( k=0; k<n; k++ ){
    vla[j][k] = (LDBL)(j*10 + k);
      }/* k */
    }/* j */
}
/*****************************************************************/
int main(void){
  static LDBL ld[13][13];
  ld_vla( 3, 5, ld );
  return 0;
}

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to