Disable running of callgraph-profiles.C is section attribute "e" is not supported. Index: lib/target-supports-dg.exp =================================================================== --- ...
13 years, 6 months ago
(2011-09-30 20:44:31 UTC)
#1
Disable running of callgraph-profiles.C is section attribute "e" is not
supported.
Index: lib/target-supports-dg.exp
===================================================================
--- lib/target-supports-dg.exp (revision 179400)
+++ lib/target-supports-dg.exp (working copy)
@@ -100,6 +100,16 @@
}
}
+# If this target does not support the section exclude "e" attribute,
+# skip this test.
+
+proc dg-require-section-exclude { args } {
+ if { ![ check_section_exclude_available ] } {
+ upvar dg-do-what dg-do-what
+ set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
+ }
+}
+
# If this target's linker does not support the --gc-sections flag,
# skip this test.
Index: lib/target-supports.exp
===================================================================
--- lib/target-supports.exp (revision 179400)
+++ lib/target-supports.exp (working copy)
@@ -382,6 +382,18 @@
}]
}
+# Returns true if tool chain supports "e" section attribute.
+
+proc check_section_exclude_available { } {
+ return [check_runtime_nocache section_exclude_available {
+ asm(".section \".gnu.callgraph.text.main\", \"e\"");
+ int main()
+ {
+ return 0;
+ }
+ }]
+}
+
# Returns true if --gc-sections is supported on the target.
proc check_gc_sections_available { } {
Index: g++.dg/tree-prof/callgraph-profiles.C
===================================================================
--- g++.dg/tree-prof/callgraph-profiles.C (revision 179400)
+++ g++.dg/tree-prof/callgraph-profiles.C (working copy)
@@ -1,6 +1,7 @@
/* Verify if call-graph profile sections are created
with -fcallgraph-profiles-sections. */
/* { dg-options "-O2 -fcallgraph-profiles-sections -ffunction-sections
--save-temps" } */
+/* { dg-require-section-exclude "" } */
int __attribute__ ((noinline))
foo ()
--
This patch is available for review at http://codereview.appspot.com/5167045
On 11-09-30 16:44 , Sriraman Tallam wrote: > Disable running of callgraph-profiles.C is section attribute ...
13 years, 6 months ago
(2011-09-30 20:48:53 UTC)
#2
On 11-09-30 16:44 , Sriraman Tallam wrote:
> Disable running of callgraph-profiles.C is section attribute "e" is not
supported.
OK with a ChangeLog entry.
Was the original patch sent to trunk? I don't recall.
Diego.
On Fri, Sep 30, 2011 at 1:48 PM, Diego Novillo <dnovillo@google.com> wrote: > On 11-09-30 ...
13 years, 6 months ago
(2011-09-30 20:50:57 UTC)
#4
On Fri, Sep 30, 2011 at 1:48 PM, Diego Novillo <dnovillo@google.com> wrote:
> On 11-09-30 16:44 , Sriraman Tallam wrote:
>>
>> Disable running of callgraph-profiles.C is section attribute "e" is not
>> supported.
>
> OK with a ChangeLog entry.
>
> Was the original patch sent to trunk? I don't recall.
This was only sent to google/gcc-4_6 branch.
Thanks.
>
>
> Diego.
>
13 years, 6 months ago
(2011-09-30 20:51:00 UTC)
#5
On 11-09-30 16:50 , Sriraman Tallam wrote:
> ChangeLog entry:
>
>
> * testsuite/g++.dg/tree-prof/callgraph-profiles/C: Add
> dg-require-section-exclude. * testsuite/lib/target-supports.exp
> (check_ifunc_available): New proc. *
> testsuite/lib/target-supports-dg.exp (dg-require-section-exclude): New
> proc.
Bad cut and paste?
Issue 5167045: [google]Make test callgraph-profiles.C run only when section attribute "e" is supported
Created 13 years, 6 months ago by Sriraman
Modified 13 years, 6 months ago
Reviewers: Diego Novillo
Base URL: svn+ssh://gcc.gnu.org/svn/gcc/branches/google/gcc-4_6/gcc/testsuite/
Comments: 0