[LLVMbugs] [Bug 10468] New: Variable length arrays crash compiler

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Sun Jul 24 16:44:01 PDT 2011


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: unassignedbugs at nondot.org
        ReportedBy: tydeman at tybor.com
                CC: llvmbugs at cs.uiuc.edu


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.



More information about the llvm-bugs mailing list