diff options
Diffstat (limited to 'gcc/testsuite/g++.old-deja/g++.other/optimize4.C')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.other/optimize4.C | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.other/optimize4.C b/gcc/testsuite/g++.old-deja/g++.other/optimize4.C new file mode 100644 index 000000000..f1345e671 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.other/optimize4.C @@ -0,0 +1,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(); +} |