2018-06-05 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / testsuite / c-c++-common / pr68657-1.c
blob7b62b72e42d924e75136a6934cb2a665d1ba14c2
1 /* PR c/68657 */
2 /* { dg-options "-Werror=sign-conversion -Werror=float-conversion -Werror=frame-larger-than=65536" } */
3 /* { dg-require-effective-target ptr32plus } */
5 void
6 f1 (void)
8 unsigned int a = -5; /* { dg-error "unsigned conversion from .int. to .unsigned int. changes value from .-5. to .\[0-9\]+." } */
9 (void) a;
12 int
13 f2 (void)
15 return 3.1f; /* { dg-error "conversion from .float. to .int. changes value" } */
18 int f3 (char *);
20 int
21 f4 (void)
23 char buf[131072];
24 return f3 (buf);
25 } /* { dg-error "the frame size of 1\[0-9]* bytes is larger than 65536 bytes" } */
27 /* { dg-prune-output "treated as errors" } */