aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2012-12-11 18:42:31 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2012-12-11 18:42:31 +0000
commite208b05b8b625569b3e74c93fea3c52f6c35c1aa (patch)
treefe1a0c97868bcea26ef29cf0e5a090f2d16a341c /gcc
parentdf266ea5fe3a76bc03108764befb939cc69b2f90 (diff)
downloadgcc-e208b05b8b625569b3e74c93fea3c52f6c35c1aa.zip
gcc-e208b05b8b625569b3e74c93fea3c52f6c35c1aa.tar.gz
gcc-e208b05b8b625569b3e74c93fea3c52f6c35c1aa.tar.bz2
re PR target/54121 (ICE at extract_insn, at recog.c:2123 with -fprofile-generate)
PR target/54121 * config/sparc/sparc.md (tldo_stb_sp32): Fix pasto. (tldo_stb_sp64): Likewise. (tldo_sth_sp32): Likewise. (tldo_sth_sp64): Likewise. (tldo_stw_sp32): Likewise. (tldo_stw_sp64): Likewise. (tldo_stx_sp64): Likewise. From-SVN: r194410
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/config/sparc/sparc.md14
-rw-r--r--gcc/testsuite/ChangeLog4
-rw-r--r--gcc/testsuite/gcc.dg/pr54121.c94
4 files changed, 116 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 432d710..f457101 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,14 @@
+2012-12-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR target/54121
+ * config/sparc/sparc.md (tldo_stb_sp32): Fix pasto.
+ (tldo_stb_sp64): Likewise.
+ (tldo_sth_sp32): Likewise.
+ (tldo_sth_sp64): Likewise.
+ (tldo_stw_sp32): Likewise.
+ (tldo_stw_sp64): Likewise.
+ (tldo_stx_sp64): Likewise.
+
2012-12-11 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/55193
diff --git a/gcc/config/sparc/sparc.md b/gcc/config/sparc/sparc.md
index 15ecdb4..7ec6302 100644
--- a/gcc/config/sparc/sparc.md
+++ b/gcc/config/sparc/sparc.md
@@ -7757,7 +7757,7 @@
(match_operand 3 "tld_symbolic_operand" "")]
UNSPEC_TLSLDO)
(match_operand:SI 1 "register_operand" "r")))
- (match_operand:QI 0 "register_operand" "=r"))]
+ (match_operand:QI 0 "register_operand" "r"))]
"TARGET_TLS && TARGET_ARCH32"
"stb\t%0, [%1 + %2], %%tldo_add(%3)"
[(set_attr "type" "store")])
@@ -7767,7 +7767,7 @@
(match_operand 3 "tld_symbolic_operand" "")]
UNSPEC_TLSLDO)
(match_operand:DI 1 "register_operand" "r")))
- (match_operand:QI 0 "register_operand" "=r"))]
+ (match_operand:QI 0 "register_operand" "r"))]
"TARGET_TLS && TARGET_ARCH64"
"stb\t%0, [%1 + %2], %%tldo_add(%3)"
[(set_attr "type" "store")])
@@ -7777,7 +7777,7 @@
(match_operand 3 "tld_symbolic_operand" "")]
UNSPEC_TLSLDO)
(match_operand:SI 1 "register_operand" "r")))
- (match_operand:HI 0 "register_operand" "=r"))]
+ (match_operand:HI 0 "register_operand" "r"))]
"TARGET_TLS && TARGET_ARCH32"
"sth\t%0, [%1 + %2], %%tldo_add(%3)"
[(set_attr "type" "store")])
@@ -7787,7 +7787,7 @@
(match_operand 3 "tld_symbolic_operand" "")]
UNSPEC_TLSLDO)
(match_operand:DI 1 "register_operand" "r")))
- (match_operand:HI 0 "register_operand" "=r"))]
+ (match_operand:HI 0 "register_operand" "r"))]
"TARGET_TLS && TARGET_ARCH64"
"sth\t%0, [%1 + %2], %%tldo_add(%3)"
[(set_attr "type" "store")])
@@ -7797,7 +7797,7 @@
(match_operand 3 "tld_symbolic_operand" "")]
UNSPEC_TLSLDO)
(match_operand:SI 1 "register_operand" "r")))
- (match_operand:SI 0 "register_operand" "=r"))]
+ (match_operand:SI 0 "register_operand" "r"))]
"TARGET_TLS && TARGET_ARCH32"
"st\t%0, [%1 + %2], %%tldo_add(%3)"
[(set_attr "type" "store")])
@@ -7807,7 +7807,7 @@
(match_operand 3 "tld_symbolic_operand" "")]
UNSPEC_TLSLDO)
(match_operand:DI 1 "register_operand" "r")))
- (match_operand:SI 0 "register_operand" "=r"))]
+ (match_operand:SI 0 "register_operand" "r"))]
"TARGET_TLS && TARGET_ARCH64"
"stw\t%0, [%1 + %2], %%tldo_add(%3)"
[(set_attr "type" "store")])
@@ -7817,7 +7817,7 @@
(match_operand 3 "tld_symbolic_operand" "")]
UNSPEC_TLSLDO)
(match_operand:DI 1 "register_operand" "r")))
- (match_operand:DI 0 "register_operand" "=r"))]
+ (match_operand:DI 0 "register_operand" "r"))]
"TARGET_TLS && TARGET_ARCH64"
"stx\t%0, [%1 + %2], %%tldo_add(%3)"
[(set_attr "type" "store")])
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index c6c8bea..88e2eec 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2012-12-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr54121.c: New test.
+
2012-12-11 Jakub Jelinek <jakub@redhat.com>
PR c++/55619
diff --git a/gcc/testsuite/gcc.dg/pr54121.c b/gcc/testsuite/gcc.dg/pr54121.c
new file mode 100644
index 0000000..b9a208e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54121.c
@@ -0,0 +1,94 @@
+/* PR target/54121 */
+/* Reported by Jan Engelhardt <jengelh@inai.de> */
+
+/* { dg-do compile { target fpic } } */
+/* { dg-options "-std=gnu99 -O -fPIC -fprofile-generate" } */
+
+typedef __SIZE_TYPE__ size_t;
+typedef unsigned char uint8_t;
+
+extern void *memcpy (void *__restrict __dest,
+ __const void *__restrict __src, size_t __n)
+ __attribute__ ((__nothrow__)) __attribute__ ((__nonnull__ (1, 2)));
+
+typedef enum {
+ LZMA_OK = 0,
+ LZMA_STREAM_END = 1,
+ LZMA_NO_CHECK = 2,
+ LZMA_UNSUPPORTED_CHECK = 3,
+ LZMA_GET_CHECK = 4,
+ LZMA_MEM_ERROR = 5,
+ LZMA_MEMLIMIT_ERROR = 6,
+ LZMA_FORMAT_ERROR = 7,
+ LZMA_OPTIONS_ERROR = 8,
+ LZMA_DATA_ERROR = 9,
+ LZMA_BUF_ERROR = 10,
+ LZMA_PROG_ERROR = 11,
+} lzma_ret;
+
+typedef enum {
+ LZMA_RUN = 0,
+ LZMA_SYNC_FLUSH = 1,
+ LZMA_FULL_FLUSH = 2,
+ LZMA_FINISH = 3
+} lzma_action;
+
+typedef struct {
+ void *( *alloc)(void *opaque, size_t nmemb, size_t size);
+ void ( *free)(void *opaque, void *ptr);
+ void *opaque;
+} lzma_allocator;
+
+typedef struct lzma_coder_s lzma_coder;
+
+typedef struct lzma_next_coder_s lzma_next_coder;
+
+typedef struct lzma_filter_info_s lzma_filter_info;
+
+typedef lzma_ret (*lzma_init_function)(
+ lzma_next_coder *next, lzma_allocator *allocator,
+ const lzma_filter_info *filters);
+
+typedef lzma_ret (*lzma_code_function)(
+ lzma_coder *coder, lzma_allocator *allocator,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out,
+ size_t *restrict out_pos, size_t out_size,
+ lzma_action action);
+
+typedef void (*lzma_end_function)(
+ lzma_coder *coder, lzma_allocator *allocator);
+
+typedef struct {
+ uint8_t *buf;
+ size_t pos;
+ size_t size;
+} lzma_dict;
+
+typedef struct {
+ lzma_coder *coder;
+ lzma_ret (*code)(lzma_coder *restrict coder,
+ lzma_dict *restrict dict, const uint8_t *restrict in,
+ size_t *restrict in_pos, size_t in_size);
+} lzma_lz_decoder;
+
+struct lzma_coder_s {
+ lzma_dict dict;
+ lzma_lz_decoder lz;
+};
+
+lzma_ret
+decode_buffer(lzma_coder *coder,
+ const uint8_t *restrict in, size_t *restrict in_pos,
+ size_t in_size, uint8_t *restrict out, size_t *restrict out_pos)
+{
+ while (1) {
+ const size_t dict_start = coder->dict.pos;
+ const lzma_ret ret
+ = coder->lz.code( coder->lz.coder, &coder->dict, in, in_pos, in_size);
+ const size_t copy_size = coder->dict.pos - dict_start;
+ memcpy(out + *out_pos, coder->dict.buf + dict_start, copy_size);
+ if (ret != LZMA_OK || coder->dict.pos < coder->dict.size)
+ return ret;
+ }
+}