Commit d723bc36 by Alex Velenko Committed by Alex Velenko

pr45701-1.c (history_expand_line_internal): Add an extra variable to force stack alignment.

2015-03-31  Alex Velenko  <Alex.Velenko@arm.com>

	* gcc.target/arm/pr45701-1.c (history_expand_line_internal): Add an
	extra variable to force stack alignment.
	* gcc.target/arm/pr45701-2.c (history_expand_line_internal): Add an
	extra variable to force stack alignment.

From-SVN: r221801
parent 9f5059b2
2015-03-31 Alex Velenko <Alex.Velenko@arm.com>
* gcc.target/arm/pr45701-1.c (history_expand_line_internal): Add an
extra variable to force stack alignment.
* gcc.target/arm/pr45701-2.c (history_expand_line_internal): Add an
extra variable to force stack alignment.
2015-03-31 Marek Polacek <polacek@redhat.com> 2015-03-31 Marek Polacek <polacek@redhat.com>
PR c++/65390 PR c++/65390
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
/* { dg-final { scan-assembler-not "r8" } } */ /* { dg-final { scan-assembler-not "r8" } } */
extern int hist_verify; extern int hist_verify;
extern int a1;
extern char *pre_process_line (char*); extern char *pre_process_line (char*);
extern char* str_cpy (char*, char*); extern char* str_cpy (char*, char*);
extern int str_len (char*); extern int str_len (char*);
...@@ -16,10 +17,10 @@ history_expand_line_internal (char* line) ...@@ -16,10 +17,10 @@ history_expand_line_internal (char* line)
{ {
char *new_line; char *new_line;
int old_verify; int old_verify;
int a = a1;
old_verify = hist_verify; old_verify = hist_verify;
hist_verify = 0; hist_verify = 0;
new_line = pre_process_line (line); new_line = pre_process_line (line);
hist_verify = old_verify; hist_verify = old_verify + a;
return (new_line == line) ? savestring (line) : new_line; return (new_line == line) ? savestring (line) : new_line;
} }
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
/* { dg-final { scan-assembler-not "r8" } } */ /* { dg-final { scan-assembler-not "r8" } } */
extern int hist_verify; extern int hist_verify;
extern int a1;
extern char *pre_process_line (char*); extern char *pre_process_line (char*);
extern char* savestring1 (char*, char*); extern char* savestring1 (char*, char*);
extern char* str_cpy (char*, char*); extern char* str_cpy (char*, char*);
...@@ -17,11 +18,11 @@ history_expand_line_internal (char* line) ...@@ -17,11 +18,11 @@ history_expand_line_internal (char* line)
{ {
char *new_line; char *new_line;
int old_verify; int old_verify;
int a = a1;
old_verify = hist_verify; old_verify = hist_verify;
hist_verify = 0; hist_verify = 0;
new_line = pre_process_line (line); new_line = pre_process_line (line);
hist_verify = old_verify; hist_verify = old_verify + a;
/* Two tail calls here, but r3 is not used to pass values. */ /* Two tail calls here, but r3 is not used to pass values. */
return (new_line == line) ? savestring (line) : savestring1 (new_line, line); return (new_line == line) ? savestring (line) : savestring1 (new_line, line);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment