summaryrefslogtreecommitdiffstats
path: root/clang/unittests/AST/StmtPrinterTest.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2012-09-23 11:43:14 +0000
committerChandler Carruth <chandlerc@gmail.com>2012-09-23 11:43:14 +0000
commite7a1ba5e8b21671a371960828d63520e6c74db4f (patch)
tree43bb8da43e4be1d211e9fa7b1edcb65b932959de /clang/unittests/AST/StmtPrinterTest.cpp
parentc6b4f0310c22a61fd8193ce3305486df37634f06 (diff)
downloadbcm5719-llvm-e7a1ba5e8b21671a371960828d63520e6c74db4f.tar.gz
bcm5719-llvm-e7a1ba5e8b21671a371960828d63520e6c74db4f.zip
Switch to a signed representation for the dynamic offsets while walking
across the uses of the alloca. It's entirely possible for negative numbers to come up here, and in some rare cases simply doing the 2's complement arithmetic isn't the correct decision. Notably, we can't zext the index of the GEP. The definition of GEP is that these offsets are sign extended or truncated to the size of the pointer, and then wrapping 2's complement arithmetic used. This patch fixes an issue that comes up with *no* input from the buildbots or bootstrap afaict. The only place where it manifested, disturbingly, is Clang's own regression test suite. A reduced and targeted collection of tests are added to cope with this. Note that I've tried to pin down the potential cases of overflow, but may have missed some cases. I've tried to add a few cases to test this, but its hard because LLVM has quite limited support for >64bit constructs. llvm-svn: 164475
Diffstat (limited to 'clang/unittests/AST/StmtPrinterTest.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud