* [PATCH] S390: Fix crash with -mhotpatch and gfortran @ 2014-02-12 10:28 Dominik Vogt 2014-02-12 10:30 ` [PATCH] (gcc-4.8) " Dominik Vogt 2014-02-12 11:34 ` [PATCH] " Richard Sandiford 0 siblings, 2 replies; 7+ messages in thread From: Dominik Vogt @ 2014-02-12 10:28 UTC (permalink / raw) To: gcc-patches; +Cc: Andreas Krebbel [-- Attachment #1: Type: text/plain, Size: 310 bytes --] The attached patch fixes a crash if gfortran encounters a nested function when -mhotpatch is enabled. (It slightly improves the warning message too.) This patch affects s390 only. Andreas Krebbel will commit the patch soon, if there are no objections. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany [-- Attachment #2: gcc-4.9-0001-S390-Fix-crash-when-mhotpatch-encounters-nested-func.patch --] [-- Type: text/x-diff, Size: 974 bytes --] From 352cf98ffb32c1f0fa8b961314faf6e6afffb661 Mon Sep 17 00:00:00 2001 From: Dominik Vogt <vogt@de.ibm.com> Date: Wed, 12 Feb 2014 05:53:34 +0000 Subject: [PATCH 1/2] S390: Fix crash when -mhotpatch encounters nested functions (e.g. with gfortran). --- gcc/config/s390/s390.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 32a25a4..9ae8ffd 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -5510,9 +5510,8 @@ s390_asm_output_function_label (FILE *asm_out_file, const char *fname, if (hotpatch_trampoline_halfwords >= 0 && decl_function_context (decl) != NULL_TREE) { - warning_at (0, DECL_SOURCE_LOCATION (decl), - "hotpatch_prologue is not compatible with nested" - " function"); + warning_at (0, OPT_mhotpatch, + "hotpatching is not compatible with nested functions"); hotpatch_trampoline_halfwords = -1; } } -- 1.8.3.1 [-- Attachment #3: gcc-4.9-ChangeLog --] [-- Type: text/plain, Size: 225 bytes --] 2014-02-12 Dominik Vogt <vogt@linux.vnet.ibm.com> * config/s390/s390.c (s390_asm_output_function_label): fix crash caused by bad second argument to warning_at() with -mhotpatch and nested functions (e.g. with gfortran) ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] (gcc-4.8) S390: Fix crash with -mhotpatch and gfortran 2014-02-12 10:28 [PATCH] S390: Fix crash with -mhotpatch and gfortran Dominik Vogt @ 2014-02-12 10:30 ` Dominik Vogt 2014-02-13 5:51 ` Dominik Vogt 2014-02-12 11:34 ` [PATCH] " Richard Sandiford 1 sibling, 1 reply; 7+ messages in thread From: Dominik Vogt @ 2014-02-12 10:30 UTC (permalink / raw) To: gcc-patches; +Cc: Andreas Krebbel [-- Attachment #1: Type: text/plain, Size: 409 bytes --] On Wed, Feb 12, 2014 at 11:28:38AM +0100, Dominik Vogt wrote: > The attached patch fixes a crash if gfortran encounters a nested > function when -mhotpatch is enabled. (It slightly improves the > warning message too.) > > This patch affects s390 only. Andreas Krebbel will commit the > patch soon, if there are no objections. Same patch for gcc-4.8. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany [-- Attachment #2: gcc-4.8-0001-S390-Fix-crash-when-mhotpatch-encounters-nested-func.patch --] [-- Type: text/x-diff, Size: 974 bytes --] From 0d9acbc61fa99ace25bc26d8af4f252d1c8c792d Mon Sep 17 00:00:00 2001 From: Dominik Vogt <vogt@de.ibm.com> Date: Wed, 12 Feb 2014 05:53:34 +0000 Subject: [PATCH 1/2] S390: Fix crash when -mhotpatch encounters nested functions (e.g. with gfortran). --- gcc/config/s390/s390.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 2ba1d8a..88c97c6 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -5475,9 +5475,8 @@ s390_asm_output_function_label (FILE *asm_out_file, const char *fname, if (hotpatch_trampoline_halfwords >= 0 && decl_function_context (decl) != NULL_TREE) { - warning_at (0, DECL_SOURCE_LOCATION (decl), - "hotpatch_prologue is not compatible with nested" - " function"); + warning_at (0, OPT_mhotpatch, + "hotpatching is not compatible with nested functions"); hotpatch_trampoline_halfwords = -1; } } -- 1.8.3.1 [-- Attachment #3: gcc-4.8-ChangeLog --] [-- Type: text/plain, Size: 225 bytes --] 2014-02-12 Dominik Vogt <vogt@linux.vnet.ibm.com> * config/s390/s390.c (s390_asm_output_function_label): fix crash caused by bad second argument to warning_at() with -mhotpatch and nested functions (e.g. with gfortran) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] (gcc-4.8) S390: Fix crash with -mhotpatch and gfortran 2014-02-12 10:30 ` [PATCH] (gcc-4.8) " Dominik Vogt @ 2014-02-13 5:51 ` Dominik Vogt 2014-02-13 12:40 ` Andreas Krebbel 0 siblings, 1 reply; 7+ messages in thread From: Dominik Vogt @ 2014-02-13 5:51 UTC (permalink / raw) To: gcc-patches; +Cc: rsandifo, Andreas Krebbel [-- Attachment #1: Type: text/plain, Size: 557 bytes --] On Wed, Feb 12, 2014 at 11:30:30AM +0100, Dominik Vogt wrote: > On Wed, Feb 12, 2014 at 11:28:38AM +0100, Dominik Vogt wrote: > > The attached patch fixes a crash if gfortran encounters a nested > > function when -mhotpatch is enabled. (It slightly improves the > > warning message too.) > > > > This patch affects s390 only. Andreas Krebbel will commit the > > patch soon, if there are no objections. > > Same patch for gcc-4.8. Patch updated according to Richard's suggestion in the 4.9 thread. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany [-- Attachment #2: gcc-4.8-2-0001-S390-Fix-crash-when-mhotpatch-encounters-nested-func.patch --] [-- Type: text/x-diff, Size: 1000 bytes --] From 81264c60640ae4b61cc7fa0129857ca3b3d253e8 Mon Sep 17 00:00:00 2001 From: Dominik Vogt <vogt@de.ibm.com> Date: Wed, 12 Feb 2014 05:53:34 +0000 Subject: [PATCH 1/2] S390: Fix crash when -mhotpatch encounters nested functions (e.g. with gfortran). --- gcc/config/s390/s390.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 2ba1d8a..6612bf9 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -5475,9 +5475,8 @@ s390_asm_output_function_label (FILE *asm_out_file, const char *fname, if (hotpatch_trampoline_halfwords >= 0 && decl_function_context (decl) != NULL_TREE) { - warning_at (0, DECL_SOURCE_LOCATION (decl), - "hotpatch_prologue is not compatible with nested" - " function"); + warning_at (DECL_SOURCE_LOCATION (decl), OPT_mhotpatch, + "hotpatching is not compatible with nested functions"); hotpatch_trampoline_halfwords = -1; } } -- 1.8.3.1 [-- Attachment #3: gcc-4.8-2-ChangeLog --] [-- Type: text/plain, Size: 225 bytes --] 2014-02-12 Dominik Vogt <vogt@linux.vnet.ibm.com> * config/s390/s390.c (s390_asm_output_function_label): fix crash caused by bad second argument to warning_at() with -mhotpatch and nested functions (e.g. with gfortran) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] (gcc-4.8) S390: Fix crash with -mhotpatch and gfortran 2014-02-13 5:51 ` Dominik Vogt @ 2014-02-13 12:40 ` Andreas Krebbel 0 siblings, 0 replies; 7+ messages in thread From: Andreas Krebbel @ 2014-02-13 12:40 UTC (permalink / raw) To: Dominik Vogt; +Cc: gcc-patches > 2014-02-12 Dominik Vogt <vogt@linux.vnet.ibm.com> > > * config/s390/s390.c (s390_asm_output_function_label): > fix crash caused by bad second argument to warning_at() with -mhotpatch > and nested functions (e.g. with gfortran) Applied. Thanks! -Andreas- ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] S390: Fix crash with -mhotpatch and gfortran 2014-02-12 10:28 [PATCH] S390: Fix crash with -mhotpatch and gfortran Dominik Vogt 2014-02-12 10:30 ` [PATCH] (gcc-4.8) " Dominik Vogt @ 2014-02-12 11:34 ` Richard Sandiford 2014-02-13 5:48 ` Dominik Vogt 1 sibling, 1 reply; 7+ messages in thread From: Richard Sandiford @ 2014-02-12 11:34 UTC (permalink / raw) To: vogt; +Cc: gcc-patches, Andreas Krebbel Dominik Vogt <vogt@linux.vnet.ibm.com> writes: > diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c > index 32a25a4..9ae8ffd 100644 > --- a/gcc/config/s390/s390.c > +++ b/gcc/config/s390/s390.c > @@ -5510,9 +5510,8 @@ s390_asm_output_function_label (FILE *asm_out_file, const char *fname, > if (hotpatch_trampoline_halfwords >= 0 > && decl_function_context (decl) != NULL_TREE) > { > - warning_at (0, DECL_SOURCE_LOCATION (decl), > - "hotpatch_prologue is not compatible with nested" > - " function"); > + warning_at (0, OPT_mhotpatch, > + "hotpatching is not compatible with nested functions"); Looks like this should be: warning_at (DECL_SOURCE_LOCATION (decl), OPT_mhotpatch, "hotpatching is not compatible with nested functions"); Thanks, Richard ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] S390: Fix crash with -mhotpatch and gfortran 2014-02-12 11:34 ` [PATCH] " Richard Sandiford @ 2014-02-13 5:48 ` Dominik Vogt 2014-02-13 12:41 ` Andreas Krebbel 0 siblings, 1 reply; 7+ messages in thread From: Dominik Vogt @ 2014-02-13 5:48 UTC (permalink / raw) To: gcc-patches; +Cc: rsandifo, Andreas Krebbel [-- Attachment #1: Type: text/plain, Size: 990 bytes --] On Wed, Feb 12, 2014 at 11:34:16AM +0000, Richard Sandiford wrote: > Dominik Vogt <vogt@linux.vnet.ibm.com> writes: > > diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c > > index 32a25a4..9ae8ffd 100644 > > --- a/gcc/config/s390/s390.c > > +++ b/gcc/config/s390/s390.c > > @@ -5510,9 +5510,8 @@ s390_asm_output_function_label (FILE *asm_out_file, const char *fname, > > if (hotpatch_trampoline_halfwords >= 0 > > && decl_function_context (decl) != NULL_TREE) > > { > > - warning_at (0, DECL_SOURCE_LOCATION (decl), > > - "hotpatch_prologue is not compatible with nested" > > - " function"); > > + warning_at (0, OPT_mhotpatch, > > + "hotpatching is not compatible with nested functions"); > > Looks like this should be: > > warning_at (DECL_SOURCE_LOCATION (decl), OPT_mhotpatch, > "hotpatching is not compatible with nested functions"); Yep, see updated patch. Thanks. Ciao Dominik ^_^ ^_^ -- Dominik Vogt IBM Germany [-- Attachment #2: gcc-4.9-2-0001-S390-Fix-crash-when-mhotpatch-encounters-nested-func.patch --] [-- Type: text/x-diff, Size: 1000 bytes --] From b5c24ad50180da2ac31be5c6c3d5fb827c8ab8ed Mon Sep 17 00:00:00 2001 From: Dominik Vogt <vogt@de.ibm.com> Date: Wed, 12 Feb 2014 05:53:34 +0000 Subject: [PATCH 1/2] S390: Fix crash when -mhotpatch encounters nested functions (e.g. with gfortran). --- gcc/config/s390/s390.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c index 32a25a4..ec88bf1 100644 --- a/gcc/config/s390/s390.c +++ b/gcc/config/s390/s390.c @@ -5510,9 +5510,8 @@ s390_asm_output_function_label (FILE *asm_out_file, const char *fname, if (hotpatch_trampoline_halfwords >= 0 && decl_function_context (decl) != NULL_TREE) { - warning_at (0, DECL_SOURCE_LOCATION (decl), - "hotpatch_prologue is not compatible with nested" - " function"); + warning_at (DECL_SOURCE_LOCATION (decl), OPT_mhotpatch, + "hotpatching is not compatible with nested functions"); hotpatch_trampoline_halfwords = -1; } } -- 1.8.3.1 [-- Attachment #3: gcc-4.9-2-ChangeLog --] [-- Type: text/plain, Size: 225 bytes --] 2014-02-12 Dominik Vogt <vogt@linux.vnet.ibm.com> * config/s390/s390.c (s390_asm_output_function_label): fix crash caused by bad second argument to warning_at() with -mhotpatch and nested functions (e.g. with gfortran) ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] S390: Fix crash with -mhotpatch and gfortran 2014-02-13 5:48 ` Dominik Vogt @ 2014-02-13 12:41 ` Andreas Krebbel 0 siblings, 0 replies; 7+ messages in thread From: Andreas Krebbel @ 2014-02-13 12:41 UTC (permalink / raw) To: Dominik Vogt; +Cc: gcc-patches > 2014-02-12 Dominik Vogt <vogt@linux.vnet.ibm.com> > > * config/s390/s390.c (s390_asm_output_function_label): > fix crash caused by bad second argument to warning_at() with -mhotpatch > and nested functions (e.g. with gfortran) Applied. Thanks! -Andreas- ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-02-13 12:41 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2014-02-12 10:28 [PATCH] S390: Fix crash with -mhotpatch and gfortran Dominik Vogt 2014-02-12 10:30 ` [PATCH] (gcc-4.8) " Dominik Vogt 2014-02-13 5:51 ` Dominik Vogt 2014-02-13 12:40 ` Andreas Krebbel 2014-02-12 11:34 ` [PATCH] " Richard Sandiford 2014-02-13 5:48 ` Dominik Vogt 2014-02-13 12:41 ` Andreas Krebbel
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).