Skip to content

Commit

Permalink
From Bruno Haible <haible@ilog.fr>:
Browse files Browse the repository at this point in the history
	* execute/980223.c: New test.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@18210 138bc75d-0d04-0410-961f-82ee72b054a4
  • Loading branch information
robertl committed Feb 23, 1998
1 parent 8353683 commit d46250c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gcc/testsuite/gcc.c-torture/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

Mon Feb 23 15:16:53 1998 Robert Lipe <robertl@dgii.com>
From Bruno Haible <haible@ilog.fr>:
* execute/980223.c: New test.

Fri Feb 6 14:30:48 1998 Jim Wilson <wilson@cygnus.com>

* execute/980205.c: New test.
Expand Down
31 changes: 31 additions & 0 deletions gcc/testsuite/gcc.c-torture/execute/980223.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
typedef struct { long addr; long type; } object;

object bar (object blah)
{
abort();
}

object foo (object x, object y)
{
object z = *(object*)(x.addr);
if (z.type & 64)
{
y = *(object*)(z.addr+sizeof(object));
z = *(object*)(z.addr);
if (z.type & 64)
y = bar(y);
}
return y;
}

int nil;
object cons1[2] = { {(long) &nil, 0}, {(long) &nil, 0} };
object cons2[2] = { {(long) &cons1, 64}, {(long) &nil, 0} };

main()
{
object x = {(long) &cons2, 64};
object y = {(long) &nil, 0};
object three = foo(x,y);
return 0;
}

0 comments on commit d46250c

Please sign in to comment.