public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51390] New: Builtin changes on November 29th, broke recip-5.c
@ 2011-12-02 17:16 meissner at gcc dot gnu.org
  2011-12-02 17:19 ` [Bug target/51390] " meissner at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-12-02 17:16 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51390
           Summary: Builtin changes on November 29th, broke recip-5.c
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: meissner@gcc.gnu.org
        ReportedBy: meissner@gcc.gnu.org
              Host: powerpc64-linux power-linux
            Target: powerpc64-linux
             Build: powerpc64-linux


After my builtin changes went in on November 29th, 2011, the test
gcc.target/powerpc/recip-5.c started failing.  This was due to a thinko on my
part where I used the wrong structure field to figure out the appropriate
attributes for the builtin function, and the recipdiv builtin function was not
listed as a const function with -ffast-math, which would allow the vectorizer
to vectorize the function.


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

* [Bug target/51390] Builtin changes on November 29th, broke recip-5.c
  2011-12-02 17:16 [Bug target/51390] New: Builtin changes on November 29th, broke recip-5.c meissner at gcc dot gnu.org
@ 2011-12-02 17:19 ` meissner at gcc dot gnu.org
  2011-12-02 17:26 ` meissner at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-12-02 17:19 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Michael Meissner <meissner at gcc dot gnu.org> 2011-12-02 17:18:55 UTC ---
Author: meissner
Date: Fri Dec  2 17:18:51 2011
New Revision: 181930

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=181930
Log:
PR 51390

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/rs6000/rs6000.c


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

* [Bug target/51390] Builtin changes on November 29th, broke recip-5.c
  2011-12-02 17:16 [Bug target/51390] New: Builtin changes on November 29th, broke recip-5.c meissner at gcc dot gnu.org
  2011-12-02 17:19 ` [Bug target/51390] " meissner at gcc dot gnu.org
@ 2011-12-02 17:26 ` meissner at gcc dot gnu.org
  2011-12-02 17:30 ` meissner at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-12-02 17:26 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Michael Meissner <meissner at gcc dot gnu.org> 2011-12-02 17:26:06 UTC ---
Created attachment 25972
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25972
Patch to fix the problem


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

* [Bug target/51390] Builtin changes on November 29th, broke recip-5.c
  2011-12-02 17:16 [Bug target/51390] New: Builtin changes on November 29th, broke recip-5.c meissner at gcc dot gnu.org
  2011-12-02 17:19 ` [Bug target/51390] " meissner at gcc dot gnu.org
  2011-12-02 17:26 ` meissner at gcc dot gnu.org
@ 2011-12-02 17:30 ` meissner at gcc dot gnu.org
  2011-12-04 15:53 ` dominiq at lps dot ens.fr
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: meissner at gcc dot gnu.org @ 2011-12-02 17:30 UTC (permalink / raw)
  To: gcc-bugs

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

Michael Meissner <meissner at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Michael Meissner <meissner at gcc dot gnu.org> 2011-12-02 17:30:25 UTC ---
Fixed in subversion id 181930.


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

* [Bug target/51390] Builtin changes on November 29th, broke recip-5.c
  2011-12-02 17:16 [Bug target/51390] New: Builtin changes on November 29th, broke recip-5.c meissner at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-12-02 17:30 ` meissner at gcc dot gnu.org
@ 2011-12-04 15:53 ` dominiq at lps dot ens.fr
  2011-12-06 18:22 ` meissner at linux dot vnet.ibm.com
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-12-04 15:53 UTC (permalink / raw)
  To: gcc-bugs

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

Dominique d'Humieres <dominiq at lps dot ens.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |iains at gcc dot gnu.org

--- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-12-04 15:52:47 UTC ---
On powerpc-apple-darwin9 (G5) at revision 181953, I see

FAIL: gcc.target/powerpc/recip-5.c (internal compiler error)
FAIL: gcc.target/powerpc/recip-5.c (test for excess errors)
UNRESOLVED: gcc.target/powerpc/recip-5.c scan-assembler-times xvredp 4
UNRESOLVED: gcc.target/powerpc/recip-5.c scan-assembler-times xvresp 5
UNRESOLVED: gcc.target/powerpc/recip-5.c scan-assembler-times xsredp 2
UNRESOLVED: gcc.target/powerpc/recip-5.c scan-assembler-times fres 2

The ICE is

[karma] f90/bug% gfc -mrecip=all -ffast-math -mcpu=power7
/opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c
/opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c: In function
'd_recip':
/opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c:12:39: error: Builtin
function __builtin_recipdiv is not supported with the current options
/opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c:12:39: internal
compiler error: Bus error

There was no failure for gcc.target/powerpc/recip-5.c at revision res-181782.


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

* [Bug target/51390] Builtin changes on November 29th, broke recip-5.c
  2011-12-02 17:16 [Bug target/51390] New: Builtin changes on November 29th, broke recip-5.c meissner at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2011-12-04 15:53 ` dominiq at lps dot ens.fr
@ 2011-12-06 18:22 ` meissner at linux dot vnet.ibm.com
  2011-12-06 22:08 ` dominiq at lps dot ens.fr
  2011-12-07 13:13 ` iains at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: meissner at linux dot vnet.ibm.com @ 2011-12-06 18:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Michael Meissner <meissner at linux dot vnet.ibm.com> 2011-12-06 18:21:48 UTC ---
On Sun, Dec 04, 2011 at 03:52:47PM +0000, dominiq at lps dot ens.fr wrote:
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51390
> 
> Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |iains at gcc dot gnu.org
> 
> --- Comment #4 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-12-04 15:52:47 UTC ---
> On powerpc-apple-darwin9 (G5) at revision 181953, I see
> 
> FAIL: gcc.target/powerpc/recip-5.c (internal compiler error)
> FAIL: gcc.target/powerpc/recip-5.c (test for excess errors)
> UNRESOLVED: gcc.target/powerpc/recip-5.c scan-assembler-times xvredp 4
> UNRESOLVED: gcc.target/powerpc/recip-5.c scan-assembler-times xvresp 5
> UNRESOLVED: gcc.target/powerpc/recip-5.c scan-assembler-times xsredp 2
> UNRESOLVED: gcc.target/powerpc/recip-5.c scan-assembler-times fres 2
> 
> The ICE is
> 
> [karma] f90/bug% gfc -mrecip=all -ffast-math -mcpu=power7
> /opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c
> /opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c: In function
> 'd_recip':
> /opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c:12:39: error: Builtin
> function __builtin_recipdiv is not supported with the current options
> /opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c:12:39: internal
> compiler error: Bus error
> 
> There was no failure for gcc.target/powerpc/recip-5.c at revision res-181782.

Hmmm, you debug where it is segfaulting?  I evidently messed up the standard
skip darwin on that test (since darwin don't support -mcpu=power7 to turn on
VSX), but even so the compiler should not segfault.

> -- 
> Configure bugmail: http://gcc.gnu.org/bugzilla/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug.
> You reported the bug.
>


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

* [Bug target/51390] Builtin changes on November 29th, broke recip-5.c
  2011-12-02 17:16 [Bug target/51390] New: Builtin changes on November 29th, broke recip-5.c meissner at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2011-12-06 18:22 ` meissner at linux dot vnet.ibm.com
@ 2011-12-06 22:08 ` dominiq at lps dot ens.fr
  2011-12-07 13:13 ` iains at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: dominiq at lps dot ens.fr @ 2011-12-06 22:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Dominique d'Humieres <dominiq at lps dot ens.fr> 2011-12-06 22:07:53 UTC ---
> Hmmm, you debug where it is segfaulting?

Here it what I get with gdb

 f_recip d_recip f_div d_div vec_f_recip vec_d_recip vec_f_div vec_f_div2
vec_f_div53 vec_d_div vec_d_div2 vec_d_div53 v4sf_recip1 v4sf_recip2
v2df_recip1 v4sf_recip3 v2df_recip2
Analyzing compilation unit
Performing interprocedural optimizations
 <*free_lang_data> <visibility> <early_local_cleanups> <emutls> <whole-program>
<profile_estimate> <cp> <inline> <pure-const> <static-var>Assembling functions:
 f_recip d_recip
/opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c: In function
'd_recip':
/opt/gcc/work/gcc/testsuite/gcc.target/powerpc/recip-5.c:12:39: error: Builtin
function __builtin_recipdiv is not supported with the current options

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x0036b27c in store_expr (exp=0x42811dc0, target=0x428fc290,
call_param_p=<value temporarily unavailable, due to optimizations>,
nontemporal=<value temporarily unavailable, due to optimizations>) at
../../work/gcc/expr.c:5170
5170      if (CONSTANT_P (temp) && GET_MODE (temp) == VOIDmode
(gdb) bt
#0  0x0036b27c in store_expr (exp=0x42811dc0, target=0x428fc290,
call_param_p=<value temporarily unavailable, due to optimizations>,
nontemporal=<value temporarily unavailable, due to optimizations>) at
../../work/gcc/expr.c:5170
#1  0x0036b278 in store_expr (exp=0x42811dc0, target=0x428fc290,
call_param_p=<value temporarily unavailable, due to optimizations>,
nontemporal=<value temporarily unavailable, due to optimizations>) at
../../work/gcc/expr.c:5163
Previous frame identical to this frame (gdb could not unwind past this frame)
Current language:  auto; currently c++


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

* [Bug target/51390] Builtin changes on November 29th, broke recip-5.c
  2011-12-02 17:16 [Bug target/51390] New: Builtin changes on November 29th, broke recip-5.c meissner at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2011-12-06 22:08 ` dominiq at lps dot ens.fr
@ 2011-12-07 13:13 ` iains at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: iains at gcc dot gnu.org @ 2011-12-07 13:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Iain Sandoe <iains at gcc dot gnu.org> 2011-12-07 13:13:16 UTC ---
with a stage1 compiler built with O0/g3:

/GCC/gcc-live-trunk/gcc/testsuite/gcc.target/powerpc/recip-5.c:12:39: error:
Builtin function __builtin_recipdiv is not supported with the current options

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x006cad58 in store_expr (exp=0x4289a460, target=0x4292c3a0, call_param_p=0,
nontemporal=<value temporarily unavailable, due to optimizations>) at
/GCC/gcc-live-trunk/gcc/expr.c:5170
5170      if (CONSTANT_P (temp) && GET_MODE (temp) == VOIDmode
(gdb) bt
#0  0x006cad58 in store_expr (exp=0x4289a460, target=0x4292c3a0,
call_param_p=0, nontemporal=<value temporarily unavailable, due to
optimizations>) at /GCC/gcc-live-trunk/gcc/expr.c:5170
#1  0x006c8778 in expand_assignment (to=0x4291b18c, from=0x4289a460,
nontemporal=<value temporarily unavailable, due to optimizations>) at
/GCC/gcc-live-trunk/gcc/expr.c:4948
#2  0x004b2b10 in expand_call_stmt (stmt=0x42912d20) at
/GCC/gcc-live-trunk/gcc/cfgexpand.c:2074
#3  0x004b2d00 in expand_gimple_stmt_1 (stmt=0x42912d20) at
/GCC/gcc-live-trunk/gcc/cfgexpand.c:2115
#4  0x004b3674 in expand_gimple_stmt (stmt=0x42912d20) at
/GCC/gcc-live-trunk/gcc/cfgexpand.c:2267
#5  0x004b37ac in expand_gimple_tailcall (bb=0x42919880, stmt=0x42912d20,
can_fallthru=0xbfffea94 "") at /GCC/gcc-live-trunk/gcc/cfgexpand.c:2314
#6  0x004befb4 in expand_gimple_basic_block (bb=0x42919880) at
/GCC/gcc-live-trunk/gcc/cfgexpand.c:3999
#7  0x004c1de8 in gimple_expand_cfg () at
/GCC/gcc-live-trunk/gcc/cfgexpand.c:4530
#8  0x00b2b314 in execute_one_pass (pass=0x15bb638) at
/GCC/gcc-live-trunk/gcc/passes.c:2079
#9  0x00b2b678 in execute_pass_list (pass=0x15bb638) at
/GCC/gcc-live-trunk/gcc/passes.c:2134
#10 0x00df25d4 in tree_rest_of_compilation (fndecl=0x428edd80) at
/GCC/gcc-live-trunk/gcc/tree-optimize.c:421
#11 0x00506ba8 in cgraph_expand_function (node=0x428f63d8) at
/GCC/gcc-live-trunk/gcc/cgraphunit.c:1818
#12 0x00506ea4 in cgraph_expand_all_functions () at
/GCC/gcc-live-trunk/gcc/cgraphunit.c:1885
#13 0x005081e8 in cgraph_optimize () at
/GCC/gcc-live-trunk/gcc/cgraphunit.c:2198
#14 0x005042d0 in cgraph_finalize_compilation_unit () at
/GCC/gcc-live-trunk/gcc/cgraphunit.c:1327
#15 0x00046584 in c_write_global_declarations () at
/GCC/gcc-live-trunk/gcc/c-decl.c:10026
#16 0x00cbf304 in compile_file () at /GCC/gcc-live-trunk/gcc/toplev.c:573
#17 0x00cc38c4 in do_compile () at /GCC/gcc-live-trunk/gcc/toplev.c:1928
#18 0x00cc3b88 in toplev_main (argc=28, argv=0xbffff0ac) at
/GCC/gcc-live-trunk/gcc/toplev.c:2004
#19 0x001b5f78 in main (argc=28, argv=0xbffff0ac) at
/GCC/gcc-live-trunk/gcc/main.c:36


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

end of thread, other threads:[~2011-12-07 13:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-02 17:16 [Bug target/51390] New: Builtin changes on November 29th, broke recip-5.c meissner at gcc dot gnu.org
2011-12-02 17:19 ` [Bug target/51390] " meissner at gcc dot gnu.org
2011-12-02 17:26 ` meissner at gcc dot gnu.org
2011-12-02 17:30 ` meissner at gcc dot gnu.org
2011-12-04 15:53 ` dominiq at lps dot ens.fr
2011-12-06 18:22 ` meissner at linux dot vnet.ibm.com
2011-12-06 22:08 ` dominiq at lps dot ens.fr
2011-12-07 13:13 ` iains 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).