rs6000.c (rs6000_trampoline_init): Fix error message for -mno-pointers-to-nested-function.

[gcc]
2012-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* config/rs6000/rs6000.c (rs6000_trampoline_init): Fix error
	message for -mno-pointers-to-nested-function.

[gcc/testsuite]
2012-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>

	* gcc.target/powerpc/no-r11-3.c (outer_func): Fix error message
	for -mno-pointers-to-nested-functions.

From-SVN: r183976
This commit is contained in:
Michael Meissner 2012-02-07 18:39:52 +00:00 committed by Michael Meissner
parent f22cfd73cd
commit 7cb5ce1a2d
4 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2012-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
* config/rs6000/rs6000.c (rs6000_trampoline_init): Fix error
message for -mno-pointers-to-nested-function.
2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/51994

View File

@ -24032,7 +24032,8 @@ rs6000_trampoline_init (rtx m_tramp, tree fndecl, rtx cxt)
rtx fnmem, fn_reg, toc_reg;
if (!TARGET_POINTERS_TO_NESTED_FUNCTIONS)
error ("-mno-r11 must not be used if you have trampolines");
error ("You cannot take the address of a nested function if you use "
"the -mno-pointers-to-nested-functions option.");
fnmem = gen_const_mem (Pmode, force_reg (Pmode, fnaddr));
fn_reg = gen_reg_rtx (Pmode);

View File

@ -1,3 +1,8 @@
2012-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
* gcc.target/powerpc/no-r11-3.c (outer_func): Fix error message
for -mno-pointers-to-nested-functions.
2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc.c-torture/execute/20120207-1.c: New test.

View File

@ -5,7 +5,7 @@
extern void ext_call (int (func) (void));
int
outer_func (int init) /* { dg-error "-mno-r11 must not be used if you have trampolines" "" } */
outer_func (int init) /* { dg-error "-mno-pointers-to-nested-functions option" "" } */
{
int value = init;