Initial creation of sourceware repository
This commit is contained in:
parent
cd946cff9e
commit
c906108c21
2470 changed files with 976797 additions and 0 deletions
55
gdb/testsuite/gdb.base/long_long.c
Normal file
55
gdb/testsuite/gdb.base/long_long.c
Normal file
|
@ -0,0 +1,55 @@
|
|||
/* Test long long expression; test printing in general.
|
||||
*
|
||||
* /CLO/BUILD_ENV/Exports/cc -g +e -o long_long long_long.c
|
||||
*
|
||||
* or
|
||||
*
|
||||
* cc +e +DA2.0 -g -o long_long long_long.c
|
||||
*/
|
||||
|
||||
long long callee( i )
|
||||
long long i;
|
||||
{
|
||||
register long long result;
|
||||
|
||||
result = 0x12345678;
|
||||
result = result << i;
|
||||
result += 0x9abcdef0;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int known_types()
|
||||
{
|
||||
long long bin = 0, oct = 0, dec = 0, hex = 0;
|
||||
|
||||
/* Known values, filling the full 64 bits.
|
||||
*/
|
||||
bin = 0x123456789abcdefLL; /* 64 bits = 16 hex digits */
|
||||
oct = 01234567123456701234567LL; /* = 21+ octal digits */
|
||||
dec = 12345678901234567890LL; /* = 19+ decimal digits */
|
||||
|
||||
/* Stop here and look!
|
||||
*/
|
||||
hex = bin - dec | oct;
|
||||
}
|
||||
|
||||
int main() {
|
||||
|
||||
register long long x, y;
|
||||
register long long i;
|
||||
|
||||
x = (long long) 0xfedcba9876543210LL;
|
||||
y = x++;
|
||||
x +=y;
|
||||
i = 11;
|
||||
x = callee( i );
|
||||
y += x;
|
||||
|
||||
known_types();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue