[cfe-users] Compiling llvm 3.4 using g++-4.7 on ARM: lib/LTO/LTOCodeGenerator.cpp:166:1: internal compiler error: in merge_if_block, at ifcvt.c

David Blaikie dblaikie at gmail.com
Thu Jul 31 12:03:48 PDT 2014


Probably worth adding a comment to exlpain why it needs to be there.

Also, there's a reason that coding standard is in place - because we
get better error (warning ) messages that way. Is there a way to
workaround the bug without sacrificing future warning quality?

On Thu, Jul 31, 2014 at 11:47 AM, Kim Gräsman <kim.grasman at gmail.com> wrote:
> Hi Cy,
>
> Unfortunately this goes against the general coding standards for LLVM:
> http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations
>
> but as a local workaround it seems fine.
>
> I wonder if GCC 4.7 for ARM should be listed here:
> http://llvm.org/docs/GettingStarted.html#check-here
>
> - Kim
>
>
> On Wed, Jul 30, 2014 at 10:57 AM, Cy Anetwork <cya3636 at yahoo.com> wrote:
>>
>> Hello,
>>
>> I've managed to track down some code which causes GCC to fail with an
>> internal compiler error when compiling llvm/clang for ARM.  I've included
>> the diff for this one file inline.. hope that's ok.
>>
>> ==================================8<====================================
>> --- ../llvm/lib/LTO/LTOCodeGenerator.cpp.old    2014-07-30 08:33:30 +0000
>> +++ ../llvm/lib/LTO/LTOCodeGenerator.cpp        2014-07-30 08:39:03 +0000
>> @@ -150,6 +150,9 @@
>>    case LTO_DEBUG_MODEL_DWARF:
>>      EmitDwarfDebugInfo = true;
>>      return;
>> +
>> +  default:
>> +    return;
>>    }
>>    llvm_unreachable("Unknown debug format!");
>>  }
>> @@ -161,6 +164,8 @@
>>    case LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC:
>>      CodeModel = model;
>>      return;
>> +  default:
>> +    return;
>>    }
>>    llvm_unreachable("Unknown PIC model!");
>>  }
>> @@ -293,6 +298,8 @@
>>    case LTO_CODEGEN_PIC_MODEL_DYNAMIC_NO_PIC:
>>      RelocModel = Reloc::DynamicNoPIC;
>>      break;
>> +  default:
>> +    break;
>>    }
>>
>>    // construct LTOModule, hand over ownership of module and target
>> ==================================8<====================================
>>
>> Many thanks,
>>
>> cya.net
>>
>>
>> _______________________________________________
>> cfe-users mailing list
>> cfe-users at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users
>
>
>
> _______________________________________________
> cfe-users mailing list
> cfe-users at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users
>




More information about the cfe-users mailing list