ADT
aaron-thesis
arm-eh
ast-experimental
cleanup-dtors
deferred_resn
demangler
enum
forall-pointer-decay
jacob/cs343-translation
jenkins-sandbox
new-ast
new-ast-unique-expr
new-env
no_list
persistent-indexer
pthread-emulation
qualifiedEnum
resolv-new
with_gc
Last change
on this file since 5600747 was 6bc76537, checked in by Rob Schluntz <rschlunt@…>, 8 years ago |
Add self assignment test case
|
-
Property mode
set to
100644
|
File size:
669 bytes
|
Rev | Line | |
---|
[6bc76537] | 1 | //
|
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2018 University of Waterloo
|
---|
| 3 | //
|
---|
| 4 | // The contents of this file are covered under the licence agreement in the
|
---|
| 5 | // file "LICENCE" distributed with Cforall.
|
---|
| 6 | //
|
---|
| 7 | // self-assignment.c --
|
---|
| 8 | //
|
---|
| 9 | // Author : Rob Schluntz
|
---|
| 10 | // Created On : Thu Mar 1 13:53:57 2018
|
---|
| 11 | // Last Modified By : Rob Schluntz
|
---|
| 12 | // Last Modified On : Thu Mar 1 13:53:57 2018
|
---|
| 13 | // Update Count : 2
|
---|
| 14 | //
|
---|
| 15 |
|
---|
| 16 | struct S {
|
---|
| 17 | int i;
|
---|
| 18 | };
|
---|
| 19 |
|
---|
| 20 | struct T {
|
---|
| 21 | S s;
|
---|
| 22 | };
|
---|
| 23 |
|
---|
| 24 | int main() {
|
---|
| 25 | int j = 0;
|
---|
| 26 | S s = { 0 };
|
---|
| 27 | T t = { { 0 } };
|
---|
| 28 |
|
---|
| 29 | j = j;
|
---|
| 30 | s = s;
|
---|
| 31 | s.i = s.i;
|
---|
| 32 | t.s.i = t.s.i;
|
---|
| 33 | }
|
---|
| 34 |
|
---|
| 35 | // Local Variables: //
|
---|
| 36 | // tab-width: 4 //
|
---|
| 37 | // compile-command: "cfa dtor-early-exit" //
|
---|
| 38 | // End: //
|
---|
Note:
See
TracBrowser
for help on using the repository browser.