> ./g++ -B. -B ../x86_64-unknown-linux-gnu/libstdc++-v3/src/.libs -O -flto 
> -fwhole-program auto_derivative_function.3.ii
lto1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

for

template <int dim> 
struct AutoDerivativeFunction {
    virtual void gradient_list (void);
};
template <int dim>
void AutoDerivativeFunction<dim>::gradient_list (void)
{
}
template class AutoDerivativeFunction<1>;
int main() {}


The ICE happens in IPA pure-const:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000b91ebb in propagate ()
    at /space/rguenther/src/svn/trunk/gcc/ipa-pure-const.c:876
876               if (pure_const_state < w_l->pure_const_state)
(gdb) p w_l
$1 = (funct_state) 0x0
(gdb) bt
#0  0x0000000000b91ebb in propagate ()
    at /space/rguenther/src/svn/trunk/gcc/ipa-pure-const.c:876
#1  0x00000000007d5dbd in execute_one_pass (pass=0x14b08c0)
    at /space/rguenther/src/svn/trunk/gcc/passes.c:1519


The ICE goes away when dropping either -flto or -fwhole-program.


-- 
           Summary: ICE with -flto -fwhole-program
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Keywords: lto
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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

Reply via email to