summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-13 23:10:34 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2013-11-13 23:10:34 +0000
commit0a76252a86fd0b7238b6ac3afcebd95f2deac544 (patch)
tree1d5b5f09d8d85eaa8827dc53778717ed6277c309 /gcc/testsuite
parent04ed582df9d3e47f786a087b5a484b05a4dbe7f2 (diff)
downloadgcc-0a76252a86fd0b7238b6ac3afcebd95f2deac544.tar.gz
* PR middle-end/59119
* gimple-ssa-isolate-paths.c (find_implicit_erroneous_behaviour): New function, extracted from gimple_ssa_isolate_erroneous_paths. (find_explicit_erroneous_behaviour): Similarly. (insert_trap_and_remove_trailing_statements): Remove statements in reverse order. * PR middle-end/59119 * gcc.c-torture/compile/pr59119.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204760 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59119.c23
2 files changed, 28 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 31b952b5f9e..36f48fd17f9 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-11-12 Jeff Law <law@redhat.com>
+
+ * PR middle-end/59119
+ * gcc.c-torture/compile/pr59119.c: New test.
+
2013-11-13 Martin Jambor <mjambor@suse.cz>
* gcc.dg/ira-shrinkwrap-prep-1.c: Add lp64 to target requirements.
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59119.c b/gcc/testsuite/gcc.c-torture/compile/pr59119.c
new file mode 100644
index 00000000000..b026ba5d4ac
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59119.c
@@ -0,0 +1,23 @@
+extern void *memmove (void *, const void *, __SIZE_TYPE__);
+extern void *memset (void *, int, __SIZE_TYPE__);
+
+typedef struct {
+ long n_prefix;
+ long n_spadding;
+} NumberFieldWidths;
+
+void
+fill_number(char *buf, const NumberFieldWidths *spec)
+{
+ if (spec->n_prefix) {
+ memmove(buf,
+ (char *) 0,
+ spec->n_prefix * sizeof(char));
+ buf += spec->n_prefix;
+ }
+ if (spec->n_spadding) {
+ memset(buf, 0, spec->n_spadding);
+ buf += spec->n_spadding;
+ }
+}
+