source: tests/warnings/self-assignment.cfa @ 474d610

ADTarm-ehast-experimentalenumforall-pointer-decayjacob/cs343-translationnew-ast-unique-exprpthread-emulationqualifiedEnum
Last change on this file since 474d610 was 66812dd, checked in by Peter A. Buhr <pabuhr@…>, 4 years ago

convert tests to always print output (no empty .expect files)

  • Property mode set to 100644
File size: 732 bytes
Line 
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 : Peter A. Buhr
12// Last Modified On : Sun Sep 27 09:24:34 2020
13// Update Count     : 6
14//
15
16struct S {
17        int i;
18};
19
20struct T {
21        S s;
22};
23
24int 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        #pragma message( "Compiled" )                   // force non-empty .expect file
35}
36
37// Local Variables: //
38// tab-width: 4 //
39// compile-command: "cfa self-assignment.cfa" //
40// End: //
Note: See TracBrowser for help on using the repository browser.