source: CIVL/mods/dev.civl.abc/examples/svcomp/lazy01_false-unreach-call.i

main
Last change on this file was aad342c, checked in by Stephen Siegel <siegel@…>, 3 years ago

Performing huge refactor to incorporate ABC, GMC, and SARL into CIVL repo and use Java modules.

git-svn-id: svn://vsl.cis.udel.edu/civl/trunk@5664 fb995dde-84ed-4084-dfe6-e5aef3e2452c

  • Property mode set to 100644
File size: 31.6 KB
Line 
1extern void __VERIFIER_error() __attribute__ ((__noreturn__));
2
3# 1 "lazy01_bad.c"
4# 1 "<built-in>"
5# 1 "<command-line>"
6# 1 "lazy01_bad.c"
7# 1 "/usr/include/pthread.h" 1 3 4
8# 23 "/usr/include/pthread.h" 3 4
9# 1 "/usr/include/features.h" 1 3 4
10# 363 "/usr/include/features.h" 3 4
11# 1 "/usr/include/sys/cdefs.h" 1 3 4
12# 372 "/usr/include/sys/cdefs.h" 3 4
13# 1 "/usr/include/bits/wordsize.h" 1 3 4
14# 373 "/usr/include/sys/cdefs.h" 2 3 4
15# 364 "/usr/include/features.h" 2 3 4
16# 387 "/usr/include/features.h" 3 4
17# 1 "/usr/include/gnu/stubs.h" 1 3 4
18
19
20
21# 1 "/usr/include/bits/wordsize.h" 1 3 4
22# 5 "/usr/include/gnu/stubs.h" 2 3 4
23
24
25# 1 "/usr/include/gnu/stubs-32.h" 1 3 4
26# 8 "/usr/include/gnu/stubs.h" 2 3 4
27# 388 "/usr/include/features.h" 2 3 4
28# 24 "/usr/include/pthread.h" 2 3 4
29# 1 "/usr/include/endian.h" 1 3 4
30# 37 "/usr/include/endian.h" 3 4
31# 1 "/usr/include/bits/endian.h" 1 3 4
32# 38 "/usr/include/endian.h" 2 3 4
33# 61 "/usr/include/endian.h" 3 4
34# 1 "/usr/include/bits/byteswap.h" 1 3 4
35# 62 "/usr/include/endian.h" 2 3 4
36# 25 "/usr/include/pthread.h" 2 3 4
37# 1 "/usr/include/sched.h" 1 3 4
38# 27 "/usr/include/sched.h" 3 4
39# 1 "/usr/include/bits/types.h" 1 3 4
40# 28 "/usr/include/bits/types.h" 3 4
41# 1 "/usr/include/bits/wordsize.h" 1 3 4
42# 29 "/usr/include/bits/types.h" 2 3 4
43
44
45typedef unsigned char __u_char;
46typedef unsigned short int __u_short;
47typedef unsigned int __u_int;
48typedef unsigned long int __u_long;
49
50
51typedef signed char __int8_t;
52typedef unsigned char __uint8_t;
53typedef signed short int __int16_t;
54typedef unsigned short int __uint16_t;
55typedef signed int __int32_t;
56typedef unsigned int __uint32_t;
57
58
59
60
61__extension__ typedef signed long long int __int64_t;
62__extension__ typedef unsigned long long int __uint64_t;
63
64
65
66
67
68
69
70__extension__ typedef long long int __quad_t;
71__extension__ typedef unsigned long long int __u_quad_t;
72# 131 "/usr/include/bits/types.h" 3 4
73# 1 "/usr/include/bits/typesizes.h" 1 3 4
74# 132 "/usr/include/bits/types.h" 2 3 4
75
76
77__extension__ typedef __u_quad_t __dev_t;
78__extension__ typedef unsigned int __uid_t;
79__extension__ typedef unsigned int __gid_t;
80__extension__ typedef unsigned long int __ino_t;
81__extension__ typedef __u_quad_t __ino64_t;
82__extension__ typedef unsigned int __mode_t;
83__extension__ typedef unsigned int __nlink_t;
84__extension__ typedef long int __off_t;
85__extension__ typedef __quad_t __off64_t;
86__extension__ typedef int __pid_t;
87__extension__ typedef struct { int __val[2]; } __fsid_t;
88__extension__ typedef long int __clock_t;
89__extension__ typedef unsigned long int __rlim_t;
90__extension__ typedef __u_quad_t __rlim64_t;
91__extension__ typedef unsigned int __id_t;
92__extension__ typedef long int __time_t;
93__extension__ typedef unsigned int __useconds_t;
94__extension__ typedef long int __suseconds_t;
95
96__extension__ typedef int __daddr_t;
97__extension__ typedef long int __swblk_t;
98__extension__ typedef int __key_t;
99
100
101__extension__ typedef int __clockid_t;
102
103
104__extension__ typedef void * __timer_t;
105
106
107__extension__ typedef long int __blksize_t;
108
109
110
111
112__extension__ typedef long int __blkcnt_t;
113__extension__ typedef __quad_t __blkcnt64_t;
114
115
116__extension__ typedef unsigned long int __fsblkcnt_t;
117__extension__ typedef __u_quad_t __fsblkcnt64_t;
118
119
120__extension__ typedef unsigned long int __fsfilcnt_t;
121__extension__ typedef __u_quad_t __fsfilcnt64_t;
122
123__extension__ typedef int __ssize_t;
124
125
126
127typedef __off64_t __loff_t;
128typedef __quad_t *__qaddr_t;
129typedef char *__caddr_t;
130
131
132__extension__ typedef int __intptr_t;
133
134
135__extension__ typedef unsigned int __socklen_t;
136# 28 "/usr/include/sched.h" 2 3 4
137
138
139# 1 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stddef.h" 1 3 4
140# 212 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stddef.h" 3 4
141typedef unsigned int size_t;
142# 31 "/usr/include/sched.h" 2 3 4
143
144
145
146# 1 "/usr/include/time.h" 1 3 4
147# 74 "/usr/include/time.h" 3 4
148
149
150typedef __time_t time_t;
151
152
153
154# 120 "/usr/include/time.h" 3 4
155struct timespec
156 {
157 __time_t tv_sec;
158 long int tv_nsec;
159 };
160# 35 "/usr/include/sched.h" 2 3 4
161
162
163typedef __pid_t pid_t;
164
165
166
167
168
169# 1 "/usr/include/bits/sched.h" 1 3 4
170# 74 "/usr/include/bits/sched.h" 3 4
171struct sched_param
172 {
173 int __sched_priority;
174 };
175
176
177# 97 "/usr/include/bits/sched.h" 3 4
178
179
180
181
182
183
184
185
186struct __sched_param
187 {
188 int __sched_priority;
189 };
190# 120 "/usr/include/bits/sched.h" 3 4
191typedef unsigned long int __cpu_mask;
192
193
194
195
196
197
198typedef struct
199{
200 __cpu_mask __bits[1024 / (8 * sizeof (__cpu_mask))];
201} cpu_set_t;
202# 203 "/usr/include/bits/sched.h" 3 4
203
204
205extern int __sched_cpucount (size_t __setsize, const cpu_set_t *__setp)
206 __attribute__ ((__nothrow__));
207extern cpu_set_t *__sched_cpualloc (size_t __count) __attribute__ ((__nothrow__)) ;
208extern void __sched_cpufree (cpu_set_t *__set) __attribute__ ((__nothrow__));
209
210
211# 44 "/usr/include/sched.h" 2 3 4
212
213
214
215
216
217
218
219extern int sched_setparam (__pid_t __pid, __const struct sched_param *__param)
220 __attribute__ ((__nothrow__));
221
222
223extern int sched_getparam (__pid_t __pid, struct sched_param *__param) __attribute__ ((__nothrow__));
224
225
226extern int sched_setscheduler (__pid_t __pid, int __policy,
227 __const struct sched_param *__param) __attribute__ ((__nothrow__));
228
229
230extern int sched_getscheduler (__pid_t __pid) __attribute__ ((__nothrow__));
231
232
233extern int sched_yield (void) __attribute__ ((__nothrow__));
234
235
236extern int sched_get_priority_max (int __algorithm) __attribute__ ((__nothrow__));
237
238
239extern int sched_get_priority_min (int __algorithm) __attribute__ ((__nothrow__));
240
241
242extern int sched_rr_get_interval (__pid_t __pid, struct timespec *__t) __attribute__ ((__nothrow__));
243# 126 "/usr/include/sched.h" 3 4
244
245# 26 "/usr/include/pthread.h" 2 3 4
246# 1 "/usr/include/time.h" 1 3 4
247# 30 "/usr/include/time.h" 3 4
248
249
250
251
252
253
254
255
256# 1 "/usr/lib/gcc/i686-redhat-linux/4.6.3/include/stddef.h" 1 3 4
257# 39 "/usr/include/time.h" 2 3 4
258
259
260
261# 1 "/usr/include/bits/time.h" 1 3 4
262# 43 "/usr/include/time.h" 2 3 4
263# 58 "/usr/include/time.h" 3 4
264
265
266typedef __clock_t clock_t;
267
268
269
270# 92 "/usr/include/time.h" 3 4
271typedef __clockid_t clockid_t;
272# 104 "/usr/include/time.h" 3 4
273typedef __timer_t timer_t;
274# 131 "/usr/include/time.h" 3 4
275
276
277struct tm
278{
279 int tm_sec;
280 int tm_min;
281 int tm_hour;
282 int tm_mday;
283 int tm_mon;
284 int tm_year;
285 int tm_wday;
286 int tm_yday;
287 int tm_isdst;
288
289
290 long int tm_gmtoff;
291 __const char *tm_zone;
292
293
294
295
296};
297
298
299
300
301
302
303
304
305struct itimerspec
306 {
307 struct timespec it_interval;
308 struct timespec it_value;
309 };
310
311
312struct sigevent;
313# 180 "/usr/include/time.h" 3 4
314
315
316
317extern clock_t clock (void) __attribute__ ((__nothrow__));
318
319
320extern time_t time (time_t *__timer) __attribute__ ((__nothrow__));
321
322
323extern double difftime (time_t __time1, time_t __time0)
324 __attribute__ ((__nothrow__)) __attribute__ ((__const__));
325
326
327extern time_t mktime (struct tm *__tp) __attribute__ ((__nothrow__));
328
329
330
331
332
333extern size_t strftime (char *__restrict __s, size_t __maxsize,
334 __const char *__restrict __format,
335 __const struct tm *__restrict __tp) __attribute__ ((__nothrow__));
336
337# 215 "/usr/include/time.h" 3 4
338# 1 "/usr/include/xlocale.h" 1 3 4
339# 28 "/usr/include/xlocale.h" 3 4
340typedef struct __locale_struct
341{
342
343 struct __locale_data *__locales[13];
344
345
346 const unsigned short int *__ctype_b;
347 const int *__ctype_tolower;
348 const int *__ctype_toupper;
349
350
351 const char *__names[13];
352} *__locale_t;
353
354
355typedef __locale_t locale_t;
356# 216 "/usr/include/time.h" 2 3 4
357
358extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
359 __const char *__restrict __format,
360 __const struct tm *__restrict __tp,
361 __locale_t __loc) __attribute__ ((__nothrow__));
362# 230 "/usr/include/time.h" 3 4
363
364
365
366extern struct tm *gmtime (__const time_t *__timer) __attribute__ ((__nothrow__));
367
368
369
370extern struct tm *localtime (__const time_t *__timer) __attribute__ ((__nothrow__));
371
372
373
374
375
376extern struct tm *gmtime_r (__const time_t *__restrict __timer,
377 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
378
379
380
381extern struct tm *localtime_r (__const time_t *__restrict __timer,
382 struct tm *__restrict __tp) __attribute__ ((__nothrow__));
383
384
385
386
387
388extern char *asctime (__const struct tm *__tp) __attribute__ ((__nothrow__));
389
390
391extern char *ctime (__const time_t *__timer) __attribute__ ((__nothrow__));
392
393
394
395
396
397
398
399extern char *asctime_r (__const struct tm *__restrict __tp,
400 char *__restrict __buf) __attribute__ ((__nothrow__));
401
402
403extern char *ctime_r (__const time_t *__restrict __timer,
404 char *__restrict __buf) __attribute__ ((__nothrow__));
405
406
407
408
409extern char *__tzname[2];
410extern int __daylight;
411extern long int __timezone;
412
413
414
415
416extern char *tzname[2];
417
418
419
420extern void tzset (void) __attribute__ ((__nothrow__));
421
422
423
424extern int daylight;
425extern long int timezone;
426
427
428
429
430
431extern int stime (__const time_t *__when) __attribute__ ((__nothrow__));
432# 313 "/usr/include/time.h" 3 4
433extern time_t timegm (struct tm *__tp) __attribute__ ((__nothrow__));
434
435
436extern time_t timelocal (struct tm *__tp) __attribute__ ((__nothrow__));
437
438
439extern int dysize (int __year) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
440# 328 "/usr/include/time.h" 3 4
441extern int nanosleep (__const struct timespec *__requested_time,
442 struct timespec *__remaining);
443
444
445
446extern int clock_getres (clockid_t __clock_id, struct timespec *__res) __attribute__ ((__nothrow__));
447
448
449extern int clock_gettime (clockid_t __clock_id, struct timespec *__tp) __attribute__ ((__nothrow__));
450
451
452extern int clock_settime (clockid_t __clock_id, __const struct timespec *__tp)
453 __attribute__ ((__nothrow__));
454
455
456
457
458
459
460extern int clock_nanosleep (clockid_t __clock_id, int __flags,
461 __const struct timespec *__req,
462 struct timespec *__rem);
463
464
465extern int clock_getcpuclockid (pid_t __pid, clockid_t *__clock_id) __attribute__ ((__nothrow__));
466
467
468
469
470extern int timer_create (clockid_t __clock_id,
471 struct sigevent *__restrict __evp,
472 timer_t *__restrict __timerid) __attribute__ ((__nothrow__));
473
474
475extern int timer_delete (timer_t __timerid) __attribute__ ((__nothrow__));
476
477
478extern int timer_settime (timer_t __timerid, int __flags,
479 __const struct itimerspec *__restrict __value,
480 struct itimerspec *__restrict __ovalue) __attribute__ ((__nothrow__));
481
482
483extern int timer_gettime (timer_t __timerid, struct itimerspec *__value)
484 __attribute__ ((__nothrow__));
485
486
487extern int timer_getoverrun (timer_t __timerid) __attribute__ ((__nothrow__));
488# 417 "/usr/include/time.h" 3 4
489
490# 27 "/usr/include/pthread.h" 2 3 4
491
492# 1 "/usr/include/bits/pthreadtypes.h" 1 3 4
493# 36 "/usr/include/bits/pthreadtypes.h" 3 4
494typedef unsigned long int pthread_t;
495
496
497typedef union
498{
499 char __size[36];
500 long int __align;
501} pthread_attr_t;
502
503
504typedef struct __pthread_internal_slist
505{
506 struct __pthread_internal_slist *__next;
507} __pthread_slist_t;
508
509
510
511
512typedef union
513{
514 struct __pthread_mutex_s
515 {
516 int __lock;
517 unsigned int __count;
518 int __owner;
519
520
521 int __kind;
522 unsigned int __nusers;
523 __extension__ union
524 {
525 int __spins;
526 __pthread_slist_t __list;
527 };
528 } __data;
529 char __size[24];
530 long int __align;
531} pthread_mutex_t;
532
533typedef union
534{
535 char __size[4];
536 long int __align;
537} pthread_mutexattr_t;
538
539
540
541
542typedef union
543{
544 struct
545 {
546 int __lock;
547 unsigned int __futex;
548 __extension__ unsigned long long int __total_seq;
549 __extension__ unsigned long long int __wakeup_seq;
550 __extension__ unsigned long long int __woken_seq;
551 void *__mutex;
552 unsigned int __nwaiters;
553 unsigned int __broadcast_seq;
554 } __data;
555 char __size[48];
556 __extension__ long long int __align;
557} pthread_cond_t;
558
559typedef union
560{
561 char __size[4];
562 long int __align;
563} pthread_condattr_t;
564
565
566
567typedef unsigned int pthread_key_t;
568
569
570
571typedef int pthread_once_t;
572
573
574
575
576
577typedef union
578{
579 struct
580 {
581 int __lock;
582 unsigned int __nr_readers;
583 unsigned int __readers_wakeup;
584 unsigned int __writer_wakeup;
585 unsigned int __nr_readers_queued;
586 unsigned int __nr_writers_queued;
587
588
589 unsigned char __flags;
590 unsigned char __shared;
591 unsigned char __pad1;
592 unsigned char __pad2;
593 int __writer;
594 } __data;
595 char __size[32];
596 long int __align;
597} pthread_rwlock_t;
598
599typedef union
600{
601 char __size[8];
602 long int __align;
603} pthread_rwlockattr_t;
604
605
606
607
608
609typedef volatile int pthread_spinlock_t;
610
611
612
613
614typedef union
615{
616 char __size[20];
617 long int __align;
618} pthread_barrier_t;
619
620typedef union
621{
622 char __size[4];
623 int __align;
624} pthread_barrierattr_t;
625# 29 "/usr/include/pthread.h" 2 3 4
626# 1 "/usr/include/bits/setjmp.h" 1 3 4
627# 29 "/usr/include/bits/setjmp.h" 3 4
628typedef int __jmp_buf[6];
629# 30 "/usr/include/pthread.h" 2 3 4
630# 1 "/usr/include/bits/wordsize.h" 1 3 4
631# 31 "/usr/include/pthread.h" 2 3 4
632
633
634
635enum
636{
637 PTHREAD_CREATE_JOINABLE,
638
639 PTHREAD_CREATE_DETACHED
640
641};
642
643
644
645enum
646{
647 PTHREAD_MUTEX_TIMED_NP,
648 PTHREAD_MUTEX_RECURSIVE_NP,
649 PTHREAD_MUTEX_ERRORCHECK_NP,
650 PTHREAD_MUTEX_ADAPTIVE_NP
651
652 ,
653 PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
654 PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
655 PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
656 PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
657
658
659
660
661
662};
663
664
665
666
667enum
668{
669 PTHREAD_MUTEX_STALLED,
670 PTHREAD_MUTEX_STALLED_NP = PTHREAD_MUTEX_STALLED,
671 PTHREAD_MUTEX_ROBUST,
672 PTHREAD_MUTEX_ROBUST_NP = PTHREAD_MUTEX_ROBUST
673};
674# 115 "/usr/include/pthread.h" 3 4
675enum
676{
677 PTHREAD_RWLOCK_PREFER_READER_NP,
678 PTHREAD_RWLOCK_PREFER_WRITER_NP,
679 PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
680 PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_READER_NP
681};
682# 147 "/usr/include/pthread.h" 3 4
683enum
684{
685 PTHREAD_INHERIT_SCHED,
686
687 PTHREAD_EXPLICIT_SCHED
688
689};
690
691
692
693enum
694{
695 PTHREAD_SCOPE_SYSTEM,
696
697 PTHREAD_SCOPE_PROCESS
698
699};
700
701
702
703enum
704{
705 PTHREAD_PROCESS_PRIVATE,
706
707 PTHREAD_PROCESS_SHARED
708
709};
710# 182 "/usr/include/pthread.h" 3 4
711struct _pthread_cleanup_buffer
712{
713 void (*__routine) (void *);
714 void *__arg;
715 int __canceltype;
716 struct _pthread_cleanup_buffer *__prev;
717};
718
719
720enum
721{
722 PTHREAD_CANCEL_ENABLE,
723
724 PTHREAD_CANCEL_DISABLE
725
726};
727enum
728{
729 PTHREAD_CANCEL_DEFERRED,
730
731 PTHREAD_CANCEL_ASYNCHRONOUS
732
733};
734# 220 "/usr/include/pthread.h" 3 4
735
736
737
738
739
740extern int pthread_create (pthread_t *__restrict __newthread,
741 __const pthread_attr_t *__restrict __attr,
742 void *(*__start_routine) (void *),
743 void *__restrict __arg) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
744
745
746
747
748
749extern void pthread_exit (void *__retval) __attribute__ ((__noreturn__));
750
751
752
753
754
755
756
757extern int pthread_join (pthread_t __th, void **__thread_return);
758# 263 "/usr/include/pthread.h" 3 4
759extern int pthread_detach (pthread_t __th) __attribute__ ((__nothrow__));
760
761
762
763extern pthread_t pthread_self (void) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
764
765
766extern int pthread_equal (pthread_t __thread1, pthread_t __thread2) __attribute__ ((__nothrow__));
767
768
769
770
771
772
773
774extern int pthread_attr_init (pthread_attr_t *__attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
775
776
777extern int pthread_attr_destroy (pthread_attr_t *__attr)
778 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
779
780
781extern int pthread_attr_getdetachstate (__const pthread_attr_t *__attr,
782 int *__detachstate)
783 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
784
785
786extern int pthread_attr_setdetachstate (pthread_attr_t *__attr,
787 int __detachstate)
788 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
789
790
791
792extern int pthread_attr_getguardsize (__const pthread_attr_t *__attr,
793 size_t *__guardsize)
794 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
795
796
797extern int pthread_attr_setguardsize (pthread_attr_t *__attr,
798 size_t __guardsize)
799 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
800
801
802
803extern int pthread_attr_getschedparam (__const pthread_attr_t *__restrict
804 __attr,
805 struct sched_param *__restrict __param)
806 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
807
808
809extern int pthread_attr_setschedparam (pthread_attr_t *__restrict __attr,
810 __const struct sched_param *__restrict
811 __param) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
812
813
814extern int pthread_attr_getschedpolicy (__const pthread_attr_t *__restrict
815 __attr, int *__restrict __policy)
816 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
817
818
819extern int pthread_attr_setschedpolicy (pthread_attr_t *__attr, int __policy)
820 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
821
822
823extern int pthread_attr_getinheritsched (__const pthread_attr_t *__restrict
824 __attr, int *__restrict __inherit)
825 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
826
827
828extern int pthread_attr_setinheritsched (pthread_attr_t *__attr,
829 int __inherit)
830 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
831
832
833
834extern int pthread_attr_getscope (__const pthread_attr_t *__restrict __attr,
835 int *__restrict __scope)
836 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
837
838
839extern int pthread_attr_setscope (pthread_attr_t *__attr, int __scope)
840 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
841
842
843extern int pthread_attr_getstackaddr (__const pthread_attr_t *__restrict
844 __attr, void **__restrict __stackaddr)
845 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2))) __attribute__ ((__deprecated__));
846
847
848
849
850
851extern int pthread_attr_setstackaddr (pthread_attr_t *__attr,
852 void *__stackaddr)
853 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1))) __attribute__ ((__deprecated__));
854
855
856extern int pthread_attr_getstacksize (__const pthread_attr_t *__restrict
857 __attr, size_t *__restrict __stacksize)
858 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
859
860
861
862
863extern int pthread_attr_setstacksize (pthread_attr_t *__attr,
864 size_t __stacksize)
865 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
866
867
868
869extern int pthread_attr_getstack (__const pthread_attr_t *__restrict __attr,
870 void **__restrict __stackaddr,
871 size_t *__restrict __stacksize)
872 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2, 3)));
873
874
875
876
877extern int pthread_attr_setstack (pthread_attr_t *__attr, void *__stackaddr,
878 size_t __stacksize) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
879# 413 "/usr/include/pthread.h" 3 4
880extern int pthread_setschedparam (pthread_t __target_thread, int __policy,
881 __const struct sched_param *__param)
882 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (3)));
883
884
885extern int pthread_getschedparam (pthread_t __target_thread,
886 int *__restrict __policy,
887 struct sched_param *__restrict __param)
888 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2, 3)));
889
890
891extern int pthread_setschedprio (pthread_t __target_thread, int __prio)
892 __attribute__ ((__nothrow__));
893# 478 "/usr/include/pthread.h" 3 4
894extern int pthread_once (pthread_once_t *__once_control,
895 void (*__init_routine) (void)) __attribute__ ((__nonnull__ (1, 2)));
896# 490 "/usr/include/pthread.h" 3 4
897extern int pthread_setcancelstate (int __state, int *__oldstate);
898
899
900
901extern int pthread_setcanceltype (int __type, int *__oldtype);
902
903
904extern int pthread_cancel (pthread_t __th);
905
906
907
908
909extern void pthread_testcancel (void);
910
911
912
913
914typedef struct
915{
916 struct
917 {
918 __jmp_buf __cancel_jmp_buf;
919 int __mask_was_saved;
920 } __cancel_jmp_buf[1];
921 void *__pad[4];
922} __pthread_unwind_buf_t __attribute__ ((__aligned__));
923# 524 "/usr/include/pthread.h" 3 4
924struct __pthread_cleanup_frame
925{
926 void (*__cancel_routine) (void *);
927 void *__cancel_arg;
928 int __do_it;
929 int __cancel_type;
930};
931# 664 "/usr/include/pthread.h" 3 4
932extern void __pthread_register_cancel (__pthread_unwind_buf_t *__buf)
933 __attribute__ ((__regparm__ (1)));
934# 676 "/usr/include/pthread.h" 3 4
935extern void __pthread_unregister_cancel (__pthread_unwind_buf_t *__buf)
936 __attribute__ ((__regparm__ (1)));
937# 717 "/usr/include/pthread.h" 3 4
938extern void __pthread_unwind_next (__pthread_unwind_buf_t *__buf)
939 __attribute__ ((__regparm__ (1))) __attribute__ ((__noreturn__))
940
941 __attribute__ ((__weak__))
942
943 ;
944
945
946
947struct __jmp_buf_tag;
948extern int __sigsetjmp (struct __jmp_buf_tag *__env, int __savemask) __attribute__ ((__nothrow__));
949
950
951
952
953
954extern int pthread_mutex_init (pthread_mutex_t *__mutex,
955 __const pthread_mutexattr_t *__mutexattr)
956 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
957
958
959extern int pthread_mutex_destroy (pthread_mutex_t *__mutex)
960 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
961
962
963extern int pthread_mutex_trylock (pthread_mutex_t *__mutex)
964 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
965
966
967extern int pthread_mutex_lock (pthread_mutex_t *__mutex)
968 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
969
970
971
972extern int pthread_mutex_timedlock (pthread_mutex_t *__restrict __mutex,
973 __const struct timespec *__restrict
974 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
975
976
977
978extern int pthread_mutex_unlock (pthread_mutex_t *__mutex)
979 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
980
981
982
983extern int pthread_mutex_getprioceiling (__const pthread_mutex_t *
984 __restrict __mutex,
985 int *__restrict __prioceiling)
986 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
987
988
989
990extern int pthread_mutex_setprioceiling (pthread_mutex_t *__restrict __mutex,
991 int __prioceiling,
992 int *__restrict __old_ceiling)
993 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 3)));
994
995
996
997
998extern int pthread_mutex_consistent (pthread_mutex_t *__mutex)
999 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1000# 790 "/usr/include/pthread.h" 3 4
1001extern int pthread_mutexattr_init (pthread_mutexattr_t *__attr)
1002 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1003
1004
1005extern int pthread_mutexattr_destroy (pthread_mutexattr_t *__attr)
1006 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1007
1008
1009extern int pthread_mutexattr_getpshared (__const pthread_mutexattr_t *
1010 __restrict __attr,
1011 int *__restrict __pshared)
1012 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1013
1014
1015extern int pthread_mutexattr_setpshared (pthread_mutexattr_t *__attr,
1016 int __pshared)
1017 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1018
1019
1020
1021extern int pthread_mutexattr_gettype (__const pthread_mutexattr_t *__restrict
1022 __attr, int *__restrict __kind)
1023 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1024
1025
1026
1027
1028extern int pthread_mutexattr_settype (pthread_mutexattr_t *__attr, int __kind)
1029 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1030
1031
1032
1033extern int pthread_mutexattr_getprotocol (__const pthread_mutexattr_t *
1034 __restrict __attr,
1035 int *__restrict __protocol)
1036 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1037
1038
1039
1040extern int pthread_mutexattr_setprotocol (pthread_mutexattr_t *__attr,
1041 int __protocol)
1042 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1043
1044
1045extern int pthread_mutexattr_getprioceiling (__const pthread_mutexattr_t *
1046 __restrict __attr,
1047 int *__restrict __prioceiling)
1048 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1049
1050
1051extern int pthread_mutexattr_setprioceiling (pthread_mutexattr_t *__attr,
1052 int __prioceiling)
1053 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1054
1055
1056
1057extern int pthread_mutexattr_getrobust (__const pthread_mutexattr_t *__attr,
1058 int *__robustness)
1059 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1060
1061
1062
1063
1064
1065
1066
1067extern int pthread_mutexattr_setrobust (pthread_mutexattr_t *__attr,
1068 int __robustness)
1069 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1070# 872 "/usr/include/pthread.h" 3 4
1071extern int pthread_rwlock_init (pthread_rwlock_t *__restrict __rwlock,
1072 __const pthread_rwlockattr_t *__restrict
1073 __attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1074
1075
1076extern int pthread_rwlock_destroy (pthread_rwlock_t *__rwlock)
1077 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1078
1079
1080extern int pthread_rwlock_rdlock (pthread_rwlock_t *__rwlock)
1081 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1082
1083
1084extern int pthread_rwlock_tryrdlock (pthread_rwlock_t *__rwlock)
1085 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1086
1087
1088
1089extern int pthread_rwlock_timedrdlock (pthread_rwlock_t *__restrict __rwlock,
1090 __const struct timespec *__restrict
1091 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1092
1093
1094
1095extern int pthread_rwlock_wrlock (pthread_rwlock_t *__rwlock)
1096 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1097
1098
1099extern int pthread_rwlock_trywrlock (pthread_rwlock_t *__rwlock)
1100 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1101
1102
1103
1104extern int pthread_rwlock_timedwrlock (pthread_rwlock_t *__restrict __rwlock,
1105 __const struct timespec *__restrict
1106 __abstime) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1107
1108
1109
1110extern int pthread_rwlock_unlock (pthread_rwlock_t *__rwlock)
1111 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1112
1113
1114
1115
1116
1117extern int pthread_rwlockattr_init (pthread_rwlockattr_t *__attr)
1118 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1119
1120
1121extern int pthread_rwlockattr_destroy (pthread_rwlockattr_t *__attr)
1122 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1123
1124
1125extern int pthread_rwlockattr_getpshared (__const pthread_rwlockattr_t *
1126 __restrict __attr,
1127 int *__restrict __pshared)
1128 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1129
1130
1131extern int pthread_rwlockattr_setpshared (pthread_rwlockattr_t *__attr,
1132 int __pshared)
1133 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1134
1135
1136extern int pthread_rwlockattr_getkind_np (__const pthread_rwlockattr_t *
1137 __restrict __attr,
1138 int *__restrict __pref)
1139 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1140
1141
1142extern int pthread_rwlockattr_setkind_np (pthread_rwlockattr_t *__attr,
1143 int __pref) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1144
1145
1146
1147
1148
1149
1150
1151extern int pthread_cond_init (pthread_cond_t *__restrict __cond,
1152 __const pthread_condattr_t *__restrict
1153 __cond_attr) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1154
1155
1156extern int pthread_cond_destroy (pthread_cond_t *__cond)
1157 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1158
1159
1160extern int pthread_cond_signal (pthread_cond_t *__cond)
1161 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1162
1163
1164extern int pthread_cond_broadcast (pthread_cond_t *__cond)
1165 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1166
1167
1168
1169
1170
1171
1172extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
1173 pthread_mutex_t *__restrict __mutex)
1174 __attribute__ ((__nonnull__ (1, 2)));
1175# 984 "/usr/include/pthread.h" 3 4
1176extern int pthread_cond_timedwait (pthread_cond_t *__restrict __cond,
1177 pthread_mutex_t *__restrict __mutex,
1178 __const struct timespec *__restrict
1179 __abstime) __attribute__ ((__nonnull__ (1, 2, 3)));
1180
1181
1182
1183
1184extern int pthread_condattr_init (pthread_condattr_t *__attr)
1185 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1186
1187
1188extern int pthread_condattr_destroy (pthread_condattr_t *__attr)
1189 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1190
1191
1192extern int pthread_condattr_getpshared (__const pthread_condattr_t *
1193 __restrict __attr,
1194 int *__restrict __pshared)
1195 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1196
1197
1198extern int pthread_condattr_setpshared (pthread_condattr_t *__attr,
1199 int __pshared) __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1200
1201
1202
1203extern int pthread_condattr_getclock (__const pthread_condattr_t *
1204 __restrict __attr,
1205 __clockid_t *__restrict __clock_id)
1206 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1207
1208
1209extern int pthread_condattr_setclock (pthread_condattr_t *__attr,
1210 __clockid_t __clock_id)
1211 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1212# 1028 "/usr/include/pthread.h" 3 4
1213extern int pthread_spin_init (pthread_spinlock_t *__lock, int __pshared)
1214 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1215
1216
1217extern int pthread_spin_destroy (pthread_spinlock_t *__lock)
1218 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1219
1220
1221extern int pthread_spin_lock (pthread_spinlock_t *__lock)
1222 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1223
1224
1225extern int pthread_spin_trylock (pthread_spinlock_t *__lock)
1226 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1227
1228
1229extern int pthread_spin_unlock (pthread_spinlock_t *__lock)
1230 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1231
1232
1233
1234
1235
1236
1237extern int pthread_barrier_init (pthread_barrier_t *__restrict __barrier,
1238 __const pthread_barrierattr_t *__restrict
1239 __attr, unsigned int __count)
1240 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1241
1242
1243extern int pthread_barrier_destroy (pthread_barrier_t *__barrier)
1244 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1245
1246
1247extern int pthread_barrier_wait (pthread_barrier_t *__barrier)
1248 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1249
1250
1251
1252extern int pthread_barrierattr_init (pthread_barrierattr_t *__attr)
1253 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1254
1255
1256extern int pthread_barrierattr_destroy (pthread_barrierattr_t *__attr)
1257 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1258
1259
1260extern int pthread_barrierattr_getpshared (__const pthread_barrierattr_t *
1261 __restrict __attr,
1262 int *__restrict __pshared)
1263 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
1264
1265
1266extern int pthread_barrierattr_setpshared (pthread_barrierattr_t *__attr,
1267 int __pshared)
1268 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1269# 1095 "/usr/include/pthread.h" 3 4
1270extern int pthread_key_create (pthread_key_t *__key,
1271 void (*__destr_function) (void *))
1272 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1)));
1273
1274
1275extern int pthread_key_delete (pthread_key_t __key) __attribute__ ((__nothrow__));
1276
1277
1278extern void *pthread_getspecific (pthread_key_t __key) __attribute__ ((__nothrow__));
1279
1280
1281extern int pthread_setspecific (pthread_key_t __key,
1282 __const void *__pointer) __attribute__ ((__nothrow__)) ;
1283
1284
1285
1286
1287extern int pthread_getcpuclockid (pthread_t __thread_id,
1288 __clockid_t *__clock_id)
1289 __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (2)));
1290# 1129 "/usr/include/pthread.h" 3 4
1291extern int pthread_atfork (void (*__prepare) (void),
1292 void (*__parent) (void),
1293 void (*__child) (void)) __attribute__ ((__nothrow__));
1294# 1143 "/usr/include/pthread.h" 3 4
1295
1296# 2 "lazy01_bad.c" 2
1297# 1 "/usr/include/assert.h" 1 3 4
1298# 66 "/usr/include/assert.h" 3 4
1299
1300
1301
1302extern void __assert_fail (__const char *__assertion, __const char *__file,
1303 unsigned int __line, __const char *__function)
1304 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
1305
1306
1307extern void __assert_perror_fail (int __errnum, __const char *__file,
1308 unsigned int __line,
1309 __const char *__function)
1310 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
1311
1312
1313
1314
1315extern void __assert (const char *__assertion, const char *__file, int __line)
1316 __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
1317
1318
1319
1320# 3 "lazy01_bad.c" 2
1321
1322pthread_mutex_t mutex;
1323int data = 0;
1324
1325void *thread1(void *arg)
1326{
1327 pthread_mutex_lock(&mutex);
1328 data++;
1329 pthread_mutex_unlock(&mutex);
1330}
1331
1332
1333void *thread2(void *arg)
1334{
1335 pthread_mutex_lock(&mutex);
1336 data+=2;
1337 pthread_mutex_unlock(&mutex);
1338}
1339
1340
1341void *thread3(void *arg)
1342{
1343 pthread_mutex_lock(&mutex);
1344 if (data >= 3){
1345 ERROR: __VERIFIER_error();
1346 ;
1347 }
1348 pthread_mutex_unlock(&mutex);
1349}
1350
1351
1352int main()
1353{
1354 pthread_mutex_init(&mutex, 0);
1355
1356 pthread_t t1, t2, t3;
1357
1358 pthread_create(&t1, 0, thread1, 0);
1359 pthread_create(&t2, 0, thread2, 0);
1360 pthread_create(&t3, 0, thread3, 0);
1361
1362 pthread_join(t1, 0);
1363 pthread_join(t2, 0);
1364 pthread_join(t3, 0);
1365
1366 return 0;
1367}
Note: See TracBrowser for help on using the repository browser.