<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>6034</bug_id>
          
          <creation_ts>2014-03-25 04:08:31 +0000</creation_ts>
          <short_desc>ICE with -O1 and -g on mips (internal compiler error: in dwarf2out_var_location, at dwarf2out.c:20810)</short_desc>
          <delta_ts>2014-12-08 18:44:57 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>devtools / tool chain</component>
          <version>1.6</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Low</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.8</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Hongxu Jia">hongxu.jia</reporter>
          <assigned_to name="Hongxu Jia">hongxu.jia</assigned_to>
          <cc>bluelightning</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>Martin.Jansa</cc>
    
    <cc>meta.mr.watcher</cc>
    
    <cc>meta.watcher</cc>
    
    <cc>raj.khem</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>ross.burton</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>41657</commentid>
    <comment_count>0</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-03-25 04:08:31 +0000</bug_when>
    <thetext>I have hit a ICE and could reduce it to the following minimal example:

1. Only the size of array assigned with 2 caused the issue:
$ cat &gt; mipgcc-test.c &lt;&lt; END

#include &lt;stdio.h&gt;

#define ARRAY_SIZE_MAX  2

int main (int argc, char **argv)
{
        char *pStrArry[ARRAY_SIZE_MAX] = {&quot;hello&quot;};
        int i = 0;

        while(pStrArry[i] &amp;&amp; i&lt;ARRAY_SIZE_MAX)
        {
                printf(&quot;%s\n&quot;, pStrArry[i]);
                i++;
        }

        return 0;
}

END

2. Only -O1 and -g on mips caused the issue:
$ mips-poky-linux-gcc -O1 -g -o mipgcc-test mipgcc-test.c
mipgcc-test.c: In function &apos;main&apos;:
mipgcc-test.c:18:1: internal compiler error: in dwarf2out_var_location, at dwarf2out.c:20810
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See &lt;http://gcc.gnu.org/bugs.html&gt; for instructions</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>41658</commentid>
    <comment_count>1</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-03-25 04:10:32 +0000</bug_when>
    <thetext>Also File the bug to GNU:

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60643</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46411</commentid>
    <comment_count>2</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2014-10-17 10:41:20 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Also File the bug to GNU:
&gt; 
&gt; http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60643

This bug was marked as WORKSFORME mistakenly by upstream gcc developers
I have explained the issue more and gave a reason why upstream developers
testcase was wrong. Please reopen the bug upstream. I can not do this since I am not originator of bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46982</commentid>
    <comment_count>3</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2014-11-13 16:22:39 +0000</bug_when>
    <thetext>Please follow-up on Khem&apos;s request to reopen this bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47271</commentid>
    <comment_count>4</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-12-02 02:26:47 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; (In reply to comment #1)
&gt; &gt; Also File the bug to GNU:
&gt; &gt; 
&gt; &gt; http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60643
&gt; 
&gt; This bug was marked as WORKSFORME mistakenly by upstream gcc developers
&gt; I have explained the issue more and gave a reason why upstream developers
&gt; testcase was wrong. Please reopen the bug upstream. I can not do this since
&gt; I am not originator of bug.

Hi Khem

I could not reopen it neither, it didn&apos;t have that option.
so choose &apos;unconfirmed&apos; to instead</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47274</commentid>
    <comment_count>5</comment_count>
    <who name="Khem Raj">raj.khem</who>
    <bug_when>2014-12-02 05:31:05 +0000</bug_when>
    <thetext>It seems to have been fixed upstream, can you back port below commit and retest

https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=9fcfed2eb95fea03d967dfcadd1eec9cbab4a744</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47275</commentid>
    <comment_count>6</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-12-02 05:34:18 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; It seems to have been fixed upstream, can you back port below commit and
&gt; retest
&gt; 
&gt; https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;
&gt; h=9fcfed2eb95fea03d967dfcadd1eec9cbab4a744

Got it, I am doing the test

//Hongxu</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>47280</commentid>
    <comment_count>7</comment_count>
    <who name="Hongxu Jia">hongxu.jia</who>
    <bug_when>2014-12-02 09:29:00 +0000</bug_when>
    <thetext>I have built core-image-sato-sdk and runqemu qemumips
to do the above testing.

The ICE defect doesn&apos;t exist on the current gcc
...
commit fd9fc495f12c78a4f62bda5919b2ef73c9584e0b
Author: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Date:   Thu Nov 27 14:58:11 2014 +0000

    gcc-4.8: Drop unused patc
...

So I directly close these defect

//Hongxu</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>