public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
@ 2011-08-15 9:50 ro at gcc dot gnu.org
2011-08-15 11:50 ` [Bug middle-end/50083] " rguenth at gcc dot gnu.org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: ro at gcc dot gnu.org @ 2011-08-15 9:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
Bug #: 50083
Summary: [4.7 regression] All 32-bit fortran tests fail on
32-bit Solaris
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: middle-end
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: ro@gcc.gnu.org
CC: ubizjak@gmail.com
Host: i386-pc-solaris2.[89], sparc-sun-solaris2.[89]
Target: i386-pc-solaris2.[89], sparc-sun-solaris2.[89]
Build: i386-pc-solaris2.[89], sparc-sun-solaris2.[89]
Uros,
your patch
2011-08-12 Uros Bizjak <ubizjak@gmail.com>
* builtins.def (BUILT_IN_ICEIL{,F,L}, BUILT_IN_IFLOOR{,F,L}
BUILT_IN_IRINT{,F,L}, BUILT_IN_IROUND{,F,L}: New builtin definitions.
[...]
completely broke 32-bit Fortran testing on Solaris 8 and 9, both SPARC and x86:
FAIL: gfortran.dg/coarray/atomic_1.f90 -fcoarray=single -O2 (test for excess
errors)
Excess errors:
Undefined first referenced
symbol in file
__builtin_iroundf
/var/gcc/regression/trunk/8-gcc/build/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so
__builtin_iround
/var/gcc/regression/trunk/8-gcc/build/sparc-sun-solaris2.8/./libgfortran/.libs/libgfortran.so
ld: fatal: Symbol referencing errors. No output written to ./atomic_1.exe
Please fix.
Rainer
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
@ 2011-08-15 11:50 ` rguenth at gcc dot gnu.org
2011-08-19 19:43 ` ubizjak at gmail dot com
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2011-08-15 11:50 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
Richard Guenther <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.7.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
2011-08-15 11:50 ` [Bug middle-end/50083] " rguenth at gcc dot gnu.org
@ 2011-08-19 19:43 ` ubizjak at gmail dot com
2011-08-19 22:54 ` ubizjak at gmail dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2011-08-19 19:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-08-19
AssignedTo|unassigned at gcc dot |ubizjak at gmail dot com
|gnu.org |
Ever Confirmed|0 |1
--- Comment #1 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-19 19:28:11 UTC ---
Eh, usual problems with this kind of optimizations ;)
I will look into it tomorrow...
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
2011-08-15 11:50 ` [Bug middle-end/50083] " rguenth at gcc dot gnu.org
2011-08-19 19:43 ` ubizjak at gmail dot com
@ 2011-08-19 22:54 ` ubizjak at gmail dot com
2011-08-23 18:21 ` ubizjak at gmail dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2011-08-19 22:54 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
--- Comment #2 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-19 22:21:53 UTC ---
Created attachment 25058
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25058
Proposed patch to fallback to lround call
I can't trigger the problem on Linux, can you please test attached patch - or
eventually provide a testcase with all necessary compile flags.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
` (2 preceding siblings ...)
2011-08-19 22:54 ` ubizjak at gmail dot com
@ 2011-08-23 18:21 ` ubizjak at gmail dot com
2011-08-24 10:46 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2011-08-23 18:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
--- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-23 18:16:49 UTC ---
(In reply to comment #2)
> Created attachment 25058 [details]
> Proposed patch to fallback to lround call
>
> I can't trigger the problem on Linux, can you please test attached patch - or
> eventually provide a testcase with all necessary compile flags.
Clock starts ticking ...
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
` (3 preceding siblings ...)
2011-08-23 18:21 ` ubizjak at gmail dot com
@ 2011-08-24 10:46 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-08-24 10:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-08-24 10:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
--- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-08-24 10:43:58 UTC ---
> --- Comment #3 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-23 18:16:49 UTC ---
> (In reply to comment #2)
>> Created attachment 25058 [details]
>> Proposed patch to fallback to lround call
>>
>> I can't trigger the problem on Linux, can you please test attached patch - or
>> eventually provide a testcase with all necessary compile flags.
>
> Clock starts ticking ...
Sorry, I missed this. The following test (reduced from
libgfortran/intrinsics/c99_functions.c) fails for me:
$ cat iround.i
float roundf (float x);
long int
lroundf (float x)
{
return (long int) roundf (x);
}
$ ./cc1 -quiet -O2 -march=pentiumpro iround.i
$ cat iround.s
.file "iround.i"
.text
.align 16
.globl lroundf
.type lroundf, @function
lroundf:
.LFB0:
.cfi_startproc
jmp __builtin_iroundf
.cfi_endproc
.LFE0:
.size lroundf, .-lroundf
.ident "GCC: (GNU) 4.7.0 20110819 (experimental) [trunk revision
177911]"
I'll try the patch next thing.
Rainer
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
` (4 preceding siblings ...)
2011-08-24 10:46 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-08-24 10:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-08-25 15:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-08-24 10:57 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
--- Comment #5 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-08-24 10:47:56 UTC ---
At least rebuilding cc1 with the patched builtins.c doesn't make a
difference.
Rainer
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
` (5 preceding siblings ...)
2011-08-24 10:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-08-25 15:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-08-25 17:00 ` ubizjak at gmail dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2011-08-25 15:43 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
--- Comment #6 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> 2011-08-25 15:29:38 UTC ---
I can now also reproduce the failure on x86_64-unknown-linux-gnu:
cc1 -quiet -O2 -m32 iround.i -muclibc
With the default (-mglibc), it doesn't occur.
Rainer
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
` (6 preceding siblings ...)
2011-08-25 15:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
@ 2011-08-25 17:00 ` ubizjak at gmail dot com
2011-08-25 18:32 ` ubizjak at gmail dot com
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2011-08-25 17:00 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |ASSIGNED
--- Comment #7 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-25 16:48:38 UTC ---
Thanks, confirmed.
Looking into it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
` (7 preceding siblings ...)
2011-08-25 17:00 ` ubizjak at gmail dot com
@ 2011-08-25 18:32 ` ubizjak at gmail dot com
2011-08-26 16:13 ` uros at gcc dot gnu.org
2011-08-26 16:14 ` ubizjak at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2011-08-25 18:32 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
--- Comment #8 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-25 18:30:54 UTC ---
Too many trees to see the forest case ;)
We also have to protect conversion of round, rint and nearbyint with
TARGET_C99.
Obvious patch (also includes non-harmful typo in existing code):
--cut here--
Index: convert.c
===================================================================
--- convert.c (revision 178071)
+++ convert.c (working copy)
@@ -469,6 +469,9 @@ convert_to_integer (tree type, tree expr)
break;
CASE_FLT_FN (BUILT_IN_ROUND):
+ /* Only convert in ISO C99 mode. */
+ if (!TARGET_C99_FUNCTIONS)
+ break;
if (outprec < TYPE_PRECISION (integer_type_node)
|| (outprec == TYPE_PRECISION (integer_type_node)
&& !TYPE_UNSIGNED (type)))
@@ -487,11 +490,14 @@ convert_to_integer (tree type, tree expr)
break;
/* ... Fall through ... */
CASE_FLT_FN (BUILT_IN_RINT):
+ /* Only convert in ISO C99 mode. */
+ if (!TARGET_C99_FUNCTIONS)
+ break;
if (outprec < TYPE_PRECISION (integer_type_node)
|| (outprec == TYPE_PRECISION (integer_type_node)
&& !TYPE_UNSIGNED (type)))
fn = mathfn_built_in (s_intype, BUILT_IN_IRINT);
- else if (outprec < TYPE_PRECISION (long_integer_type_node)
+ else if (outprec == TYPE_PRECISION (long_integer_type_node)
&& !TYPE_UNSIGNED (type))
fn = mathfn_built_in (s_intype, BUILT_IN_LRINT);
else if (outprec == TYPE_PRECISION (long_long_integer_type_node)
--cut here--
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
` (8 preceding siblings ...)
2011-08-25 18:32 ` ubizjak at gmail dot com
@ 2011-08-26 16:13 ` uros at gcc dot gnu.org
2011-08-26 16:14 ` ubizjak at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: uros at gcc dot gnu.org @ 2011-08-26 16:13 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
--- Comment #9 from uros at gcc dot gnu.org 2011-08-26 16:10:50 UTC ---
Author: uros
Date: Fri Aug 26 16:10:45 2011
New Revision: 178119
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=178119
Log:
PR middle-end/50083
* convert.c (convert_to_integer) <BUIT_IN_ROUND{,F,L}>: Convert
only when TARGET_C99_FUNCTIONS.
<BUILT_IN_NEARBYINT{,F,L}>: Ditto.
<BUILT_IN_RINT{,F,L}>: Ditto.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/convert.c
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug middle-end/50083] [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
` (9 preceding siblings ...)
2011-08-26 16:13 ` uros at gcc dot gnu.org
@ 2011-08-26 16:14 ` ubizjak at gmail dot com
10 siblings, 0 replies; 12+ messages in thread
From: ubizjak at gmail dot com @ 2011-08-26 16:14 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50083
Uros Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
URL| |http://gcc.gnu.org/ml/gcc-p
| |atches/2011-08/msg02097.htm
| |l
Resolution| |FIXED
--- Comment #10 from Uros Bizjak <ubizjak at gmail dot com> 2011-08-26 16:13:18 UTC ---
Fixed.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2011-08-26 16:13 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-15 9:50 [Bug middle-end/50083] New: [4.7 regression] All 32-bit fortran tests fail on 32-bit Solaris ro at gcc dot gnu.org
2011-08-15 11:50 ` [Bug middle-end/50083] " rguenth at gcc dot gnu.org
2011-08-19 19:43 ` ubizjak at gmail dot com
2011-08-19 22:54 ` ubizjak at gmail dot com
2011-08-23 18:21 ` ubizjak at gmail dot com
2011-08-24 10:46 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-08-24 10:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-08-25 15:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
2011-08-25 17:00 ` ubizjak at gmail dot com
2011-08-25 18:32 ` ubizjak at gmail dot com
2011-08-26 16:13 ` uros at gcc dot gnu.org
2011-08-26 16:14 ` ubizjak at gmail dot com
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).