File:  [Research Unix] / researchv10no / cmd / lcc / ph / int3.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:35 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv10, HEAD
researchv10 Norman

/* The Plum Hall Validation Suite for C
 * Unpublished copyright (c) 1986-1991, Chiron Systems Inc and Plum Hall Inc.
 * VERSION: 4
 * DATE: 1993-01-01
 * The "ANSI" mode of the Suite corresponds to the official ANSI C, X3.159-1989.
 * As per your license agreement, your distribution is not to be moved or copied outside the Designated Site
 * without specific permission from Plum Hall Inc.
 */

/****************************************************************************
 ** Self-checking C source code generated by EGEN component of             **
 **    The Plum Hall Validation Suite for C.                               **
 **    (C) 1986-1988 Chiron Systems Inc and Plum Hall Inc                  **
 **    EGEN Version 1.09.000  88/08/21                                     **
 **                                                                        **
 **    EGEN -P -R3 -V -A -N5 -Dinteger.gen ( @ @ ) @ ( @ @ )               **
 ****************************************************************************/
#include "defs.h"


int main()
	{
	extern char *Filename;
	auto unsigned int ui;
	static unsigned int * pui;
	auto unsigned int ** ppui;
	auto int i;
	static int * pi;
	auto int ** ppi;
	auto unsigned short us;
	static unsigned short * pus;
	auto unsigned short ** ppus;
	auto short s;
	static short * ps;
	auto short ** pps;
	auto unsigned char uc;
	static unsigned char * puc;
	auto unsigned char ** ppuc;
	auto char c;
	static char * pc;
	auto char ** ppc;
	auto unsigned long ul;
	static unsigned long * pul;
	auto unsigned long ** ppul;
	auto long l;
	static long * pl;
	auto long ** ppl;
	register int rint1;
	register int rint2;
	register int rint3;
	register int rint4;
	register int rint5;

	ui = ivalue(100);
	pui = &ui;
	ppui = &pui;
	i = ivalue(10);
	pi = &i;
	ppi = π
	us = lvalue(33000);
	pus = &us;
	ppus = &pus;
	s = ivalue(13);
	ps = &s;
	pps = &ps;
	uc = ivalue(128);
	puc = &uc;
	ppuc = &puc;
	c = ivalue(20);
	pc = &c;
	ppc = &pc;
	ul = lvalue(65000L);
	pul = &ul;
	ppul = &pul;
	l = lvalue(97L);
	pl = &l;
	ppl = &pl;
	rint1 = ivalue(1);
	rint2 = ivalue(2);
	rint3 = ivalue(3);
	rint4 = ivalue(4);
	rint5 = ivalue(5);
	Filename = "int3.c";

	/* 0x80 & 0xfde8L => 0x80L */
	/* 13 &= 0x80L => 0 */
	/* 10 == 128 => 0 */
	/* 5 |= 0 => 5 */
	/* 0 <= 5 => 1 */
	iequals(__LINE__, ((*ps &= (uc & ul)) <= (rint5 |= (*pi == uc))), 1);
	iequals(__LINE__, rint5, 5);
	iequals(__LINE__, s, 0);

	/* ! 0xfde8L => 0 */
	/* 0 | 0x80 => 128 */
	/* 0x80e8 - 0x80 => 0x8068 */
	/* 0xfde8L < 0x8068 => 0 */
	/* 128 >> 0 => 128 */
	iequals(__LINE__, ((( ! ul) | *puc) >> (*pul < (**ppus - uc))), 128);

	/* post-- 2 => 3 */
	/* 0x80e8 != 3 => 1 */
	/* 0x64 / 0xfde8L => 0x0L */
	/* 1 + 0x0L => 0x1L */
	/* 1 ^ 0x1L => 0x0L */
	lequals(__LINE__, ((**ppus != ((rint3)-- )) ^ (rint1 + (**ppui / **ppul))), 0x0L);
	iequals(__LINE__, rint3, 2);

	/* 97L - 0x64 => -3L */
	/* 0x64 ^ -3L => -103L */
	/* 10 *= 2 => 20 */
	/* 1 ^= 20 => 21 */
	/* -103L == 21 => 0 */
	iequals(__LINE__, ((**ppui ^ (*pl - ui)) == (rint1 ^= (i *= rint3))), 0);
	iequals(__LINE__, i, 20);
	iequals(__LINE__, rint1, 21);

	/* pre-- 0 => -1 */
	/* 0xfde8L %= -1 => 0xfde8L */
	/* ! 97L => 0 */
	/* 0 - 20 => -20 */
	/* 0xfde8L * -20 => 0xffec29e0L */
/* 	lequals(__LINE__, ((ul %= ( -- *ps)) * (( ! *pl) - **ppc)), 0xffec29e0L); DELETED: NON-PORTABLE */
/* 	iequals(__LINE__, s, -1); DELETED: NON-PORTABLE */
/* 	lequals(__LINE__, ul, 65000L); DELETED: NON-PORTABLE */

	return 	report(Filename);
	}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.