Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/gcc.dg/uninit-21.c @ 118:fd00160c1b76
ifdef TARGET_64BIT
author | mir3636 |
---|---|
date | Tue, 27 Feb 2018 15:01:35 +0900 |
parents | 04ced10e8804 |
children |
line wrap: on
line source
/* PR69537, spurious warning because of a missed optimization. */ /* { dg-do compile } */ /* { dg-options "-O2 -fno-short-enums -Wuninitialized" } */ enum clnt_stat { RPC_SUCCESS=0, RPC_CANTENCODEARGS=1, }; int do_ypcall_tr (); static int yp_master (char **outname) { // Replacing enum clnt_stat with int avoids the warning. enum clnt_stat result; result = do_ypcall_tr (); if (result != 0) return result; *outname = __builtin_strdup ("foo"); return 0; } int yp_update (void) { char *master; int r; if ((r = yp_master (&master)) != 0) return r; __builtin_free (master); /* { dg-bogus "uninitialized" } */ return 0; }