[cfe-commits] r77829 - in /cfe/trunk: lib/CodeGen/CGExprConstant.cpp test/CodeGen/union-init2.c

Daniel Dunbar daniel at zuster.org
Sun Aug 2 18:21:13 PDT 2009


Hi Eli,

On Sat, Aug 1, 2009 at 4:11 PM, Eli Friedman<eli.friedman at gmail.com> wrote:
> ==============================================================================
> --- cfe/trunk/test/CodeGen/union-init2.c (added)
> +++ cfe/trunk/test/CodeGen/union-init2.c Sat Aug  1 18:11:24 2009
> @@ -0,0 +1,4 @@
> +// RUN: clang-cc -emit-llvm %s -o - | not grep ptrtoint
> +
> +// Make sure we generate something sane instead of a ptrtoint
> +union x {long long b;union x* a;} r = {.a = &r};

This test should also have some kind of positive check.

 - Daniel




More information about the cfe-commits mailing list