[LLVMbugs] [Bug 11653] New: Trouble indexing (*array)[][]'s

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Dec 26 18:30:48 PST 2011


             Bug #: 11653
           Summary: Trouble indexing (*array)[][]'s
           Product: clang
           Version: 2.9
          Platform: Macintosh
        OS/Version: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: radford at blackbean.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

The following should exit with a zero status and will if you comment out the
indicated line.

int main(int c, char **v)
    int p[20], a = 10, (*P)[2][a] = (int(*)[2][a]) p;

    if (0) (*P)[0][0] = 0; // comment me out to work around the bug             
    return &p[1*a+0] - &(*P)[1][0];

It fails with g++ from llvm-gcc-4.2-2.9-x86_64-apple-darwin10, and doesn't
compile with clang++ from clang+llvm-3.0-x86_64-apple-darwin11.

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