summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/optimize4.C
blob: f1345e671bbdab97f8b98f48854390cd024bd363 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// { dg-do assemble  }
// 
// Copyright (C) 2001 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 24 Jul 2001 <nathan@codesourcery.com>

// Bug 3543. We forgot to resolve an OFFSET_REF


struct Writeable {
  bool blocking_mode;
};


struct Pipe : Writeable {
  void ewrite();

  void set_write_blocking ()
  {
    if (Writeable::blocking_mode);
  }
};

void Pipe::ewrite()
{
  set_write_blocking();
}

void ewrite(Pipe &p)
{
  p.set_write_blocking();
}