gcc/gcc/testsuite/gcc.dg/varpool-1.c
Marek Polacek 8ece1ab347 20001012-1.c: Fix defaulting to int.
* gcc.dg/20001012-1.c: Fix defaulting to int.
	* gcc.dg/20001012-2.c: Likewise.
	* gcc.dg/20001108-1.c: Likewise.
	* gcc.dg/20010516-1.c: Likewise.
	* gcc.dg/20011008-2.c: Likewise.
	* gcc.dg/20030612-1.c: Likewise.
	* gcc.dg/20040219-1.c: Likewise.
	* gcc.dg/20050603-2.c: Likewise.
	* gcc.dg/20070507-1.c: Likewise.
	* gcc.dg/attr-alias-3.c: Likewise.
	* gcc.dg/fastmath-1.c: Likewise.
	* gcc.dg/fork-instrumentation.c: Likewise.
	* gcc.dg/fwrapv-1.c: Likewise.
	* gcc.dg/fwrapv-2.c: Likewise.
	* gcc.dg/memmove-1.c: Likewise.
	* gcc.dg/non-local-goto-1.c: Likewise.
	* gcc.dg/non-local-goto-2.c: Likewise.
	* gcc.dg/noreturn-8.c: Likewise.
	* gcc.dg/parse-decl-after-if.c: Likewise.
	* gcc.dg/parse-decl-after-label.c: Likewise.
	* gcc.dg/pr25795-1.c: Likewise.
	* gcc.dg/pr25795.c: Likewise.
	* gcc.dg/pr28574.c: Likewise.
	* gcc.dg/pr30189.c: Likewise.
	* gcc.dg/pr31529-2.c: Likewise.
	* gcc.dg/pr33923.c: Likewise.
	* gcc.dg/pr34263.c: Likewise.
	* gcc.dg/pr36194.c: Likewise.
	* gcc.dg/pr45415.c: Likewise.
	* gcc.dg/pr47443.c: Likewise.
	* gcc.dg/pr47763.c: Likewise.
	* gcc.dg/pr49000.c: Likewise.
	* gcc.dg/pr50340.c: Likewise.
	* gcc.dg/webizer.c: Likewise.
	* gcc.dg/pr59940.c: Likewise.
	* gcc.dg/pr63186.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-int.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-int128.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-longlong.c: Likewise.
	* gcc.dg/simulate-thread/atomic-load-short.c: Likewise.
	* gcc.dg/simulate-thread/atomic-other-int.c: Likewise.
	* gcc.dg/sms-1.c: Likewise.
	* gcc.dg/unused-3.c: Likewise.
	* gcc.dg/varpool-1.c: Likewise.
	* gcc.dg/pr35899.c: Use -std=gnu89.
	* gcc.dg/pr59963-1.c: Likewise.
	* gcc.dg/redecl-15.c: Likewise.
	* gcc.dg/20041213-1.c: Likewise.
	* gcc.dg/20080820.c: Likewise.
	* gcc.dg/920413-1.c: Likewise.
	* gcc.dg/Wold-style-definition-1.c: Likewise.
	* gcc.dg/Wmissing-parameter-type-no.c: Likewise.
	* gcc.dg/decl-nospec-1.c: Likewise.
	* gcc.dg/decl-nospec-2.c: Likewise.
	* gcc.dg/decl-nospec-3.c: Likewise.
	* gcc.dg/bitfld-1.c: Likewise.
	* gcc.dg/bitfld-9.c: Likewise.
	* gcc.dg/parm-impl-decl-1.c: Likewise.
	* gcc.dg/parm-impl-decl-3.c: Likewise.
	* gcc.dg/pr18596-1.c: Likewise.
	* gcc.dg/pr18596-2.c: Likewise.
	* gcc.dg/pr18596-3.c: Likewise.
	* gcc.dg/pr60139.c: Likewise.
	* gcc.dg/utf-dflt.c: Likewise.
	* gcc.dg/utf-dflt2.c: Likewise.
	* gcc.dg/wtr-func-def-1.c: Likewise.
	* gcc.dg/declspec-5.c: Likewise.
	* gcc.dg/declspec-6.c: Likewise.
	* gcc.dg/ftrapv-2.c: Likewise.
	* gcc.dg/20020430-1.c: Fix implicit declarations.
	* gcc.dg/20030702-1.c: Likewise.
	* gcc.dg/20040127-2.c: Likewise.
	* gcc.dg/20041122-1.c: Likewise.
	* gcc.dg/20050309-1.c: Likewise.
	* gcc.dg/20061026.c: Likewise.
	* gcc.dg/20101010-1.c: Likewise.
	* gcc.dg/Werror-1.c: Likewise.
	* gcc.dg/Werror-10.c: Likewise.
	* gcc.dg/Werror-11.c: Likewise.
	* gcc.dg/Werror-12.c: Likewise.
	* gcc.dg/Werror-2.c: Likewise.
	* gcc.dg/Werror-3.c: Likewise.
	* gcc.dg/Werror-4.c: Likewise.
	* gcc.dg/Werror-5.c: Likewise.
	* gcc.dg/Werror-6.c: Likewise.
	* gcc.dg/Werror-7.c: Likewise.
	* gcc.dg/Werror-8.c: Likewise.
	* gcc.dg/Wstrict-overflow-20.c: Likewise.
	* gcc.dg/cpp/trad/macroargs.c: Likewise.
	* gcc.dg/delay-slot-2.c: Likewise.
	* gcc.dg/errno-1.c: Likewise.
	* gcc.dg/globalalias.c: Likewise.
	* gcc.dg/inline-3.c: Likewise.
	* gcc.dg/localalias.c: Likewise.
	* gcc.dg/pr19633-1.c: Likewise.
	* gcc.dg/pr19633.c: Likewise.
	* gcc.dg/pr23408.c: Likewise.
	* gcc.dg/pr23470-1.c: Likewise.
	* gcc.dg/pr28121.c: Likewise.
	* gcc.dg/pr28243.c: Likewise.
	* gcc.dg/pr30260.c: Likewise.
	* gcc.dg/pr32573.c: Likewise.
	* gcc.dg/pr33826.c: Likewise.
	* gcc.dg/pr35065.c: Likewise.
	* gcc.dg/pr38616.c: Likewise.
	* gcc.dg/pr39867.c: Likewise.
	* gcc.dg/pr41470.c: Likewise.
	* gcc.dg/pr41837.c: Likewise.
	* gcc.dg/pr44024.c: Likewise.
	* gcc.dg/pr44699.c: Likewise.
	* gcc.dg/pr46252.c: Likewise.
	* gcc.dg/pr46878-1.c: Likewise.
	* gcc.dg/pr50908-3.c: Likewise.
	* gcc.dg/pr51796.c: Likewise.
	* gcc.dg/pr55150-2.c: Likewise.
	* gcc.dg/pr55833.c: Likewise.
	* gcc.dg/pr59350.c: Likewise.
	* gcc.dg/pr59418.c: Likewise.
	* gcc.dg/pr60647-2.c: Likewise.
	* gcc.dg/uninit-suppress.c: Likewise.
	* gcc.dg/uninit-suppress_2.c: Likewise.
	* gcc.dg/20030805-1.c: Use -fgnu89-inline.
	* gcc.dg/always_inline.c: Likewise.
	* gcc.dg/always_inline2.c: Likewise.
	* gcc.dg/always_inline3.c: Likewise.
	* gcc.dg/builtin-apply4.c: Likewise.
	* gcc.dg/declspec-7.c: Likewise.
	* gcc.dg/inline-1.c: Likewise.
	* gcc.dg/va-arg-pack-1.c: Likewise.
	* gcc.dg/winline-2.c: Likewise.
	* gcc.dg/winline-3.c: Likewise.
	* gcc.dg/winline-5.c: Likewise.
	* gcc.dg/winline-6.c: Likewise.
	* gcc.dg/winline-7.c: Likewise.
	* gcc.dg/funcorder.c: Fix implicit declarations.  Fix defaulting to
	int. 
	* gcc.dg/inline-33.c: Likewise.
	* gcc.dg/pr27861-1.c: Likewise.
	* gcc.dg/pr28888.c: Likewise.
	* gcc.dg/pr29254.c: Likewise.
	* gcc.dg/pr50908.c: Likewise.
	* gcc.dg/pr60647-1.c: Likewise.
	* gcc.dg/pragma-diag-1.c: Likewise.
	* gcc.dg/pr31529-1.c: Use -fgnu89-inline.  Fix defaulting to int.
	* gcc.dg/winline-9.c: Likewise.
	* gcc.dg/pr52808.c: Return 0 instead of nothing.

From-SVN: r215925
2014-10-06 11:46:21 +00:00

25 lines
819 B
C

/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-not "unnecesary_static_initialized_variable" } } */
static int unnecesary_static_initialized_variable;
static int *unnecesary_static_initialized_variable2 =
&unnecesary_static_initialized_variable;
static inline int
simplify_after_inline (int param1, int *param2)
{
if (unnecesary_static_initialized_variable != param1)
return unnecesary_static_initialized_variable;
if (unnecesary_static_initialized_variable2 != param2)
return unnecesary_static_initialized_variable;
}
int
main ()
{
return simplify_after_inline (unnecesary_static_initialized_variable,
unnecesary_static_initialized_variable2) +
simplify_after_inline (unnecesary_static_initialized_variable,
unnecesary_static_initialized_variable2);
}