re PR tree-optimization/34172 (Missed store ccp optimization)
[official-gcc.git] / gcc / testsuite / gcc.dg / dremf-type-compat-3.c
blob437e26f65ba3b153e19300eff6500922ed12c3ee
1 /* Test for bogus diagnostics for dremf definition. Although this
2 definition is formally incorrect in ISO C, a GNU extension permits
3 a prototype followed by unpromoted types in a function definition,
4 so it should be permitted when the function is built in. Bug
5 16666. Test with -pedantic-errors, where the problem should still
6 be diagnosed. */
7 /* { dg-do compile } */
8 /* { dg-options "-pedantic-errors" } */
10 float dremf (float, float); /* { dg-error "prototype declaration" } */
12 float
13 dremf (x, y)
14 float x;
15 float y;
16 { /* { dg-error "promoted argument '.' doesn't match prototype" } */
17 return x + y;