public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/49170] New: [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing
@ 2011-05-26 11:35 ro at gcc dot gnu.org
  2011-05-26 12:14 ` [Bug tree-optimization/49170] " wschmidt at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2011-05-26 11:35 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49170

           Summary: [4.7 regression] Several libstdc++ tests fail to link
                    on Solaris 8/9: cexp missing
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ro@gcc.gnu.org
                CC: wschmidt@gcc.gnu.org
              Host: *-*-solaris2.[89]
            Target: *-*-solaris2.[89]
             Build: *-*-solaris2.[89]


Between 20110523 and 20110525, several libstdc++ tests fail to link on Solaris
8 and 9 (both SPARC and x86) that lacks cexp in libm:

FAIL: 26_numerics/complex/13450.cc (test for excess errors)
Excess errors:
Undefined            first referenced
 symbol                  in file
cexp                                /var/tmp//ccvyjKLM.o
cexpf                               /var/tmp//ccvyjKLM.o
cexpl                               /var/tmp//ccvyjKLM.o
ld: fatal: Symbol referencing errors. No output written to ./13450.exe

Comparing -save-temps output before and after the patch, I find no changes to
the .ii file, no calls to cexp before the patch, but calls after.

I very strongly suspect this patch:

2011-05-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

        PR tree-optimization/46728
        * tree-ssa-math-opts.c (powi_table): New.
        (powi_lookup_cost): New.
        (powi_cost): New.
        (powi_as_mults_1): New.
        (powi_as_mults): New.
        (gimple_expand_builtin_powi): New.
        (execute_cse_sincos): Add switch case for BUILT_IN_POWI.
        (gate_cse_sincos): Remove sincos/cexp restriction.

Please fix.
  Rainer


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/49170] [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing
  2011-05-26 11:35 [Bug tree-optimization/49170] New: [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing ro at gcc dot gnu.org
@ 2011-05-26 12:14 ` wschmidt at gcc dot gnu.org
  2011-05-26 12:34 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-05-26 12:14 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49170

--- Comment #1 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-05-26 12:12:00 UTC ---
I'll take a look.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/49170] [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing
  2011-05-26 11:35 [Bug tree-optimization/49170] New: [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing ro at gcc dot gnu.org
  2011-05-26 12:14 ` [Bug tree-optimization/49170] " wschmidt at gcc dot gnu.org
@ 2011-05-26 12:34 ` rguenth at gcc dot gnu.org
  2011-05-26 13:44 ` wschmidt at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-05-26 12:34 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49170

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-05-26 12:13:35 UTC ---
I think the TARGET_HAS_SINCOS || TARGET_C99_FUNCTIONS has to be moved somewhere
else.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/49170] [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing
  2011-05-26 11:35 [Bug tree-optimization/49170] New: [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing ro at gcc dot gnu.org
  2011-05-26 12:14 ` [Bug tree-optimization/49170] " wschmidt at gcc dot gnu.org
  2011-05-26 12:34 ` rguenth at gcc dot gnu.org
@ 2011-05-26 13:44 ` wschmidt at gcc dot gnu.org
  2011-05-27 10:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-05-26 13:44 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49170

--- Comment #3 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-05-26 13:24:31 UTC ---
Rainer, please try:

Index: tree-ssa-math-opts.c
===================================================================
--- tree-ssa-math-opts.c    (revision 174277)
+++ tree-ssa-math-opts.c    (working copy)
@@ -1093,6 +1093,10 @@ execute_cse_sincos (void)
         CASE_FLT_FN (BUILT_IN_COS):
         CASE_FLT_FN (BUILT_IN_SIN):
         CASE_FLT_FN (BUILT_IN_CEXPI):
+          /* Make sure we have either sincos or cexp.  */
+          if (!TARGET_HAS_SINCOS && !TARGET_C99_FUNCTIONS)
+            break;
+
           arg = gimple_call_arg (stmt, 0);
           if (TREE_CODE (arg) == SSA_NAME)
             cfg_changed |= execute_cse_sincos_1 (arg);

and let me know if it solves the problem.

Thanks,
Bill


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/49170] [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing
  2011-05-26 11:35 [Bug tree-optimization/49170] New: [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing ro at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-05-26 13:44 ` wschmidt at gcc dot gnu.org
@ 2011-05-27 10:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
  2011-05-27 10:32 ` dominiq at lps dot ens.fr
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-05-27 10:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49170

--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-05-27 10:05:28 UTC ---
> --- Comment #3 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-05-26 13:24:31 UTC ---
> Rainer, please try:
[...]
> and let me know if it solves the problem.

It does: I've bootstrapped i386-pc-solaris2.8 with the patch and both
the libstdc++ failures went away, as well as several gfortran ones.

Thanks.
        Rainer


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/49170] [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing
  2011-05-26 11:35 [Bug tree-optimization/49170] New: [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing ro at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-05-27 10:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-05-27 10:32 ` dominiq at lps dot ens.fr
  2011-05-27 13:32 ` wschmidt at gcc dot gnu.org
  2011-07-18 15:16 ` ro at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-05-27 10:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49170

--- Comment #5 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-05-27 10:15:37 UTC ---
> +          /* Make sure we have either sincos or cexp.  */
> +          if (!TARGET_HAS_SINCOS && !TARGET_C99_FUNCTIONS)
> +            break;
> +

Could you please have a look to pr 31249?


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/49170] [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing
  2011-05-26 11:35 [Bug tree-optimization/49170] New: [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing ro at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-05-27 10:32 ` dominiq at lps dot ens.fr
@ 2011-05-27 13:32 ` wschmidt at gcc dot gnu.org
  2011-07-18 15:16 ` ro at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: wschmidt at gcc dot gnu.org @ 2011-05-27 13:32 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49170

--- Comment #6 from William J. Schmidt <wschmidt at gcc dot gnu.org> 2011-05-27 13:30:01 UTC ---
Author: wschmidt
Date: Fri May 27 13:29:57 2011
New Revision: 174331

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=174331
Log:
Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog    (revision 174330)
+++ gcc/ChangeLog    (working copy)
@@ -1,3 +1,9 @@
+2011-05-27  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
+
+    PR tree-optimization/49170
+    * tree-ssa-math-opts.c (execute_cse_sincos):  Add checks for
+    sincos or cexp.
+    
 2011-05-27  Richard Guenther  <rguenther@suse.de>

     PR middle-end/49189
Index: gcc/tree-ssa-math-opts.c
===================================================================
--- gcc/tree-ssa-math-opts.c    (revision 174330)
+++ gcc/tree-ssa-math-opts.c    (working copy)
@@ -1093,6 +1093,10 @@ execute_cse_sincos (void)
         CASE_FLT_FN (BUILT_IN_COS):
         CASE_FLT_FN (BUILT_IN_SIN):
         CASE_FLT_FN (BUILT_IN_CEXPI):
+          /* Make sure we have either sincos or cexp.  */
+          if (!TARGET_HAS_SINCOS && !TARGET_C99_FUNCTIONS)
+            break;
+
           arg = gimple_call_arg (stmt, 0);
           if (TREE_CODE (arg) == SSA_NAME)
             cfg_changed |= execute_cse_sincos_1 (arg);

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/tree-ssa-math-opts.c


^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Bug tree-optimization/49170] [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing
  2011-05-26 11:35 [Bug tree-optimization/49170] New: [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing ro at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-05-27 13:32 ` wschmidt at gcc dot gnu.org
@ 2011-07-18 15:16 ` ro at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ro at gcc dot gnu.org @ 2011-07-18 15:16 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49170

Rainer Orth <ro at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #7 from Rainer Orth <ro at gcc dot gnu.org> 2011-07-18 15:16:07 UTC ---
Fixed.


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-07-18 15:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-26 11:35 [Bug tree-optimization/49170] New: [4.7 regression] Several libstdc++ tests fail to link on Solaris 8/9: cexp missing ro at gcc dot gnu.org
2011-05-26 12:14 ` [Bug tree-optimization/49170] " wschmidt at gcc dot gnu.org
2011-05-26 12:34 ` rguenth at gcc dot gnu.org
2011-05-26 13:44 ` wschmidt at gcc dot gnu.org
2011-05-27 10:16 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-05-27 10:32 ` dominiq at lps dot ens.fr
2011-05-27 13:32 ` wschmidt at gcc dot gnu.org
2011-07-18 15:16 ` ro at gcc dot gnu.org

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).