diff options
author | Richard Guenther <rguenther@suse.de> | 2008-12-04 15:55:25 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2008-12-04 15:55:25 +0000 |
commit | ce1b6498020a6124415ed9b03eaa07d682c25455 (patch) | |
tree | 266c7ec6506d5c152c0f89ceef62763632c6a3ee /gcc/testsuite/g++.dg | |
parent | a4781348e23ac96865470f4b11c170e9f40a44d5 (diff) | |
download | gcc-ce1b6498020a6124415ed9b03eaa07d682c25455.zip gcc-ce1b6498020a6124415ed9b03eaa07d682c25455.tar.gz gcc-ce1b6498020a6124415ed9b03eaa07d682c25455.tar.bz2 |
re PR middle-end/36509 (gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c)
2008-12-04 Richard Guenther <rguenther@suse.de>
PR middle-end/36509
PR c++/38334
* Makefile.in (tree-ssa-alias-warnings.o): Remove.
(tree-ssa-structalias.o): Remove errors.h dependency.
(tree-ssa-reassoc.o): Likewise.
* tree-ssa-reassoc.c: Do not include errors.h.
* tree-ssa-alias-warnings.c: Remove.
* tree-ssa-alias.c (compute_may_aliases): Remove call to
strict_aliasing_warning_backend.
* tree-ssa-structalias.c (emit_pointer_definition): New function.
(emit_alias_warning): Likewise.
(set_uids_in_ptset): Warn for clear cases of type-punning.
* tree-inline.c (remap_gimple_op_r): Preserve TREE_NO_WARNING
on INDIRECT_REFs.
cp/
* typeck.c (get_member_function_from_ptrfunc): Mark the vtbl
pointer access with TREE_NO_WARNING.
* gcc.dg/Wstrict-aliasing-float-ptr-int-obj.c: Adjust, remove XFAIL.
* gcc.dg/Wstrict-aliasing-converted-assigned.c: Adjust.
* g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: Likewise.
From-SVN: r142437
Diffstat (limited to 'gcc/testsuite/g++.dg')
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C index 5527808..d88ed431 100644 --- a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C +++ b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C @@ -4,7 +4,9 @@ int foo() { int x; - float& q = reinterpret_cast<float&> (x); /* { dg-warning "type-punn" } */ - q = 1.0; + float& q = reinterpret_cast<float&> (x); /* { dg-message "initialized" } */ + q = 1.0; /* { dg-warning "does break strict-aliasing" } */ return x; } + +/* { dg-message "dereferencing type-punned" "" { target *-*-* } 7 } */ |