annotate gcc/testsuite/gcc.c-torture/compile/pr37381.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
145
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
1 /* { dg-skip-if "too many arguments in function call" { bpf-*-* } } */
1830386684a0 gcc-9.2.0
anatofuz
parents: 111
diff changeset
2
111
kono
parents:
diff changeset
3 extern unsigned int __invalid_size_argument_for_IOC;
kono
parents:
diff changeset
4 typedef unsigned int __u32;
kono
parents:
diff changeset
5 struct video_window
kono
parents:
diff changeset
6 {
kono
parents:
diff changeset
7 __u32 x, y;
kono
parents:
diff changeset
8 __u32 width, height;
kono
parents:
diff changeset
9 };
kono
parents:
diff changeset
10 typedef unsigned long XID;
kono
parents:
diff changeset
11 typedef XID Window;
kono
parents:
diff changeset
12 typedef struct _XExtData
kono
parents:
diff changeset
13 {
kono
parents:
diff changeset
14 Window root;
kono
parents:
diff changeset
15 }
kono
parents:
diff changeset
16 Screen;
kono
parents:
diff changeset
17 typedef struct
kono
parents:
diff changeset
18 {
kono
parents:
diff changeset
19 int border_width;
kono
parents:
diff changeset
20 }
kono
parents:
diff changeset
21 XWindowAttributes;
kono
parents:
diff changeset
22 typedef struct _XDisplay Display;
kono
parents:
diff changeset
23 typedef struct
kono
parents:
diff changeset
24 {
kono
parents:
diff changeset
25 int default_screen;
kono
parents:
diff changeset
26 Screen *screens;
kono
parents:
diff changeset
27 }
kono
parents:
diff changeset
28 *_XPrivDisplay;
kono
parents:
diff changeset
29 typedef struct
kono
parents:
diff changeset
30 {
kono
parents:
diff changeset
31 int x, y;
kono
parents:
diff changeset
32 }
kono
parents:
diff changeset
33 XSizeHints;
kono
parents:
diff changeset
34 typedef struct
kono
parents:
diff changeset
35 {
kono
parents:
diff changeset
36 unsigned short hdisplay;
kono
parents:
diff changeset
37 unsigned short vdisplay;
kono
parents:
diff changeset
38 }
kono
parents:
diff changeset
39 XF86VidModeModeInfo;
kono
parents:
diff changeset
40 Display *display;
kono
parents:
diff changeset
41 int tfd;
kono
parents:
diff changeset
42 int ccapt;
kono
parents:
diff changeset
43 int tml;
kono
parents:
diff changeset
44 int fswidth = 0;
kono
parents:
diff changeset
45 int fsheight = 0;
kono
parents:
diff changeset
46 Window fmwin;
kono
parents:
diff changeset
47 XF86VidModeModeInfo **modelines, *fullscreenmode = ((void *) 0);
kono
parents:
diff changeset
48 struct video_window vswin;
kono
parents:
diff changeset
49 DoFullScreen (void)
kono
parents:
diff changeset
50 {
kono
parents:
diff changeset
51 int i;
kono
parents:
diff changeset
52 int rx, ry;
kono
parents:
diff changeset
53 Window junkwin;
kono
parents:
diff changeset
54 XSizeHints fmsizehints;
kono
parents:
diff changeset
55 XWindowAttributes fmwinattr;
kono
parents:
diff changeset
56 if (ioctl
kono
parents:
diff changeset
57 (tfd,
kono
parents:
diff changeset
58 (((1U) << (((0 + 8) + 8) + 14)) | ((('v')) << (0 + 8)) | (((8)) << 0) |
kono
parents:
diff changeset
59 (((((sizeof (int) == sizeof (int[1])
kono
parents:
diff changeset
60 && sizeof (int) <
kono
parents:
diff changeset
61 (1 << 14)) ? sizeof (int) : __invalid_size_argument_for_IOC))) <<
kono
parents:
diff changeset
62 ((0 + 8) + 8))), &ccapt) < 0)
kono
parents:
diff changeset
63 {
kono
parents:
diff changeset
64 perror ("ioctl VIDIOCCAPTURE");
kono
parents:
diff changeset
65 }
kono
parents:
diff changeset
66 if (!XTranslateCoordinates
kono
parents:
diff changeset
67 (display, fmwin,
kono
parents:
diff changeset
68 ((&((_XPrivDisplay) display)->
kono
parents:
diff changeset
69 screens[(((_XPrivDisplay) display)->default_screen)])->root),
kono
parents:
diff changeset
70 -fmwinattr.border_width, -fmwinattr.border_width, &rx, &ry, &junkwin))
kono
parents:
diff changeset
71 {
kono
parents:
diff changeset
72 }
kono
parents:
diff changeset
73 vswin.width = fswidth;
kono
parents:
diff changeset
74 vswin.height = fsheight;
kono
parents:
diff changeset
75 vswin.x = fmsizehints.x + rx;
kono
parents:
diff changeset
76 vswin.y = fmsizehints.y + ry;
kono
parents:
diff changeset
77 if (ioctl
kono
parents:
diff changeset
78 (tfd,
kono
parents:
diff changeset
79 (((1U) << (((0 + 8) + 8) + 14)) | ((('v')) << (0 + 8)) | (((8)) << 0) |
kono
parents:
diff changeset
80 (((((sizeof (int) == sizeof (int[1])
kono
parents:
diff changeset
81 && sizeof (int) <
kono
parents:
diff changeset
82 (1 << 14)) ? sizeof (int) : __invalid_size_argument_for_IOC))) <<
kono
parents:
diff changeset
83 ((0 + 8) + 8))), &ccapt) < 0)
kono
parents:
diff changeset
84 {
kono
parents:
diff changeset
85 XF86VidModeGetAllModeLines (display, XDefaultScreen (display), &tml,
kono
parents:
diff changeset
86 &modelines);
kono
parents:
diff changeset
87 {
kono
parents:
diff changeset
88 if ((modelines[i]->hdisplay == fswidth)
kono
parents:
diff changeset
89 && (modelines[i]->vdisplay == fsheight))
kono
parents:
diff changeset
90 {
kono
parents:
diff changeset
91 fullscreenmode = modelines[i];
kono
parents:
diff changeset
92 }
kono
parents:
diff changeset
93 }
kono
parents:
diff changeset
94 {
kono
parents:
diff changeset
95 XF86VidModeSetViewPort (display, XDefaultScreen (display), vswin.x,
kono
parents:
diff changeset
96 vswin.y);
kono
parents:
diff changeset
97 }
kono
parents:
diff changeset
98 }
kono
parents:
diff changeset
99 }