------- Comment #2 from fxcoudert at gcc dot gnu dot org  2010-09-10 21:24 
-------
Confirmed on x86_64-linux, with the following C source:

unsigned foo (__int128 i)
{
  return __builtin_popcountl ((unsigned long) i);
}


$ ./gcc/cc1 -ftree-ter a.c -quiet
a.c: In function ‘foo’:
a.c:3:30: internal compiler error: in emit_library_call_value_1, at
calls.c:3485


I don't now since how long the code above ICEs, but the revision range given in
the original report is probably not linked to the introduction of the issue,
just to when it became to be exposed by gfortran generating different code for
the POPCNT intrinsic (which was my doing, so I'm glad it's not a Fortran bug
:).

The backtrace for the failure is:


(gdb) bt
#0  fancy_abort (file=0xd0e6af "../../trunk3/gcc/calls.c", line=3485, 
    function=0xd0ea20 "emit_library_call_value_1")
    at ../../trunk3/gcc/diagnostic.c:878
#1  0x000000000055ce30 in emit_library_call_value_1 (retval=1, 
    orgfun=0x2aaaae1d56e0, value=0x0, fn_type=<value optimized out>, 
    outmode=SImode, nargs=1, p=0x7fffffffd308) at ../../trunk3/gcc/calls.c:3484
#2  0x0000000000562202 in emit_library_call_value (
    orgfun=<value optimized out>, value=<value optimized out>, 
    fn_type=<value optimized out>, outmode=<value optimized out>, 
    nargs=<value optimized out>) at ../../trunk3/gcc/calls.c:4012
#3  0x00000000007162c3 in expand_unop (mode=DImode, unoptab=0x12415b8, 
    op0=0x2aaaae1d5520, target=0x2aaaae1d5520, unsignedp=1)
    at ../../trunk3/gcc/optabs.c:3234
#4  0x000000000053e6ce in expand_builtin_unop (target_mode=SImode, 
    exp=0x2aaaae1ca7e0, target=0x2aaaae1d5520, subtarget=0x2aaaae1d5520, 
    op_optab=0x12415b8) at ../../trunk3/gcc/builtins.c:5007
#5  expand_builtin_unop (target_mode=SImode, exp=0x2aaaae1ca7e0, 
    target=0x2aaaae1d5520, subtarget=0x2aaaae1d5520, op_optab=0x12415b8)
    at ../../trunk3/gcc/builtins.c:4994


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
          Component|fortran                     |middle-end
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2010-09-10 21:24:05
               date|                            |
            Summary|[4.6 Regression]            |[4.6 Regression]
                   |gfortran.dg/popcnt_poppar_2.|__builtin_popcountl ICEs
                   |F90 ICEs in                 |with -ftree-ter
                   |emit_library_call_value_1,  |
                   |at calls.c:3485 with -ftree-|
                   |ter                         |


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

Reply via email to