<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S32 Design StudioのトピックRe: Bug in GCC 4.9.4 eabi VLE PowerPC</title>
    <link>https://community.nxp.com/t5/S32-Design-Studio/Bug-in-GCC-4-9-4-eabi-VLE-PowerPC/m-p/822501#M3795</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your report. I'll create a ticket for this.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/tag/cmpe200gcc-192/tg-p"&gt;#cmpe200gcc-192&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 12 Nov 2018 08:56:26 GMT</pubDate>
    <dc:creator>alexanderfedoto</dc:creator>
    <dc:date>2018-11-12T08:56:26Z</dc:date>
    <item>
      <title>Bug in GCC 4.9.4 eabi VLE PowerPC</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Bug-in-GCC-4-9-4-eabi-VLE-PowerPC/m-p/822500#M3794</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear NXP Team,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Starting some investigations of the multi-core MPC5748G I ran into a&lt;BR /&gt;compiler bug. I'm using the S32 Design Studio 2017 R1, the compiler is GCC&lt;BR /&gt;4.9.4 as packaged with the S32DS.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here are compiler command line and compilation output:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Compiling DEVKIT-MPC5748G-startup for production&lt;BR /&gt;Compiling C file code-Z2/mzt_main_Z2.c for Z2&lt;BR /&gt;C:/ProgramFiles/NXP/s32ds_power_v2017.r1/Cross_Tools/powerpc-eabivle-4_9/bin/powerpc-eabivle-gcc.exe -c -mbig-endian -mvle -misel=yes -meabi -msdata=default -G8 -mregnames -fshort-double -fsingle-precision-constant -mcpu=e200z2 -msoft-float -mno-string -fno-common -fno-exceptions -ffunction-sections -fdata-sections -fshort-enums -fdiagnostics-show-option -finline-functions -fmessage-length=0 -fzero-initialized-in-bss -fno-tree-loop-optimize -Wall -Wno-main -Wno-old-style-declaration -Winline -Wextra -Wstrict-overflow=4 -Wmissing-declarations -Wno-parentheses -Wdiv-by-zero -Wcast-align -Wformat -Wformat-security -Wignored-qualifiers -Wsign-conversion -Wsign-compare -Werror=missing-declarations -Werror=implicit-function-declaration -Wno-nested-externs -Werror=int-to-pointer-cast -Werror=pointer-sign -Werror=pointer-to-int-cast -Werror=return-local-addr -Werror=missing-prototypes -Werror=missing-field-initializers -specs=nosys.specs --sysroot=C:/ProgramFiles/NXP/s32ds_power_v2017.r1/Cross_Tools/powerpc-eabivle-4_9/powerpc-eabivle/newlib -MMD -Wa,-a=bin/ppc/PRODUCTION/obj/mzt_main_Z2.lst -std=gnu11 -Icode-Z2 -Icode-Z4 -Icode-Z4/startup -DPRODUCTION -DNDEBUG&amp;nbsp; -save-temps=obj -fverbose-asm&amp;nbsp; -g1 -gdwarf-2 -Os -o bin/ppc/PRODUCTION/obj/mzt_main_Z2.o code-Z2/mzt_main_Z2.c&lt;BR /&gt;code-Z2/mzt_main_Z2.c: In function 'mzt_main_Z2':&lt;BR /&gt;code-Z2/mzt_main_Z2.c:171:12: warning: conversion to 'unsigned int' from 'int' may change the sign of the result [-Wsign-conversion]&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ++ mzt_cntMainLoopsCore2;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ^&lt;BR /&gt;code-Z2/mzt_main_Z2.c:171:12: warning: right-hand operand of comma expression has no effect [-Wunused-value]&lt;BR /&gt;code-Z2/mzt_main_Z2.c:181:1: error: insn does not satisfy its constraints:&lt;BR /&gt;&amp;nbsp;} /* End of mzt_main_Z2 */&lt;BR /&gt;&amp;nbsp;^&lt;BR /&gt;(insn 92 64 24 6 (set (reg:SI 31 %r31)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (symbol_ref:SI ("mzt_cntMainLoopsCore2") [flags 0x86] &amp;lt;var_decl 03f53c60 mzt_cntMainLoopsCore2&amp;gt;)) code-Z2/mzt_main_Z2.c:171 1154 {*movsi_vle}&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (nil))&lt;BR /&gt;code-Z2/mzt_main_Z2.c:181:1: internal compiler error: in reload_cse_simplify_operands, at postreload.c:411&lt;BR /&gt;Please submit a full bug report,&lt;BR /&gt;with preprocessed source if appropriate.&lt;BR /&gt;&lt;SPAN&gt;See &amp;lt;&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fgcc.gnu.org%2Fbugs.html" rel="nofollow" target="_blank"&gt;http://gcc.gnu.org/bugs.html&lt;/A&gt;&lt;SPAN&gt;&amp;gt; for instructions.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The source code has been attached as preprocessed file for easy&lt;BR /&gt;reproducibility. The tiny portion of my failing code can be found at the&lt;BR /&gt;very end of this file. Basically it is no more than:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;_Atomic unsigned int mzt_cntMainLoopsCore2 = 0;&lt;BR /&gt;void _Noreturn mzt_main_Z2( signed int noArgs __attribute__((unused))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; , const char *argAry[] __attribute__((unused))&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; )&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while(1)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; unsigned int u;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for(u=0; u&amp;lt;7500000; ++u)&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ++ mzt_cntMainLoopsCore2; // Line 171&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;BR /&gt;} // Line 181&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The same C code compiles and executes in debug compilation. The relevant&lt;BR /&gt;differences in the compiler switches are: "-g3 -gdwarf-2 -Og" instead of&lt;BR /&gt;"-g1 -gdwarf-2 -Os"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last point lets this issue appear a code optimizer problem. I tried&lt;BR /&gt;different optimizer settings. We get the same error with -Os, -Ofast, -O3&lt;BR /&gt;and -O2 but not with -O1 and -Og.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: The bad warning about signed/unsigned mismatch seems to be an&lt;BR /&gt;unrelated, second issue; it is emitted in the otherwise successful&lt;BR /&gt;debug compilation, too.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Nov 2018 19:16:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Bug-in-GCC-4-9-4-eabi-VLE-PowerPC/m-p/822500#M3794</guid>
      <dc:creator>peter_vranken</dc:creator>
      <dc:date>2018-11-09T19:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in GCC 4.9.4 eabi VLE PowerPC</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Bug-in-GCC-4-9-4-eabi-VLE-PowerPC/m-p/822501#M3795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your report. I'll create a ticket for this.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/t5/tag/cmpe200gcc-192/tg-p"&gt;#cmpe200gcc-192&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2018 08:56:26 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Bug-in-GCC-4-9-4-eabi-VLE-PowerPC/m-p/822501#M3795</guid>
      <dc:creator>alexanderfedoto</dc:creator>
      <dc:date>2018-11-12T08:56:26Z</dc:date>
    </item>
    <item>
      <title>Re: Bug in GCC 4.9.4 eabi VLE PowerPC</title>
      <link>https://community.nxp.com/t5/S32-Design-Studio/Bug-in-GCC-4-9-4-eabi-VLE-PowerPC/m-p/822502#M3796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="color: #172b4d; background-color: #f4f5f7;"&gt;A combination of optimization, atomic access, and small data area trigs this error.&lt;/P&gt;&lt;P style="color: #172b4d; background-color: #f4f5f7; margin: 10px 0px 0px;"&gt;It can be reproduced with the following code and compiling with options:&amp;nbsp;-S -std=gnu11 -msdata -Os&lt;/P&gt;&lt;P style="color: #172b4d; background-color: #f4f5f7; margin: 10px 0px 0px;"&gt;extern _Atomic unsigned int v;&lt;BR /&gt;void foo (void)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #172b4d; background-color: #f4f5f7;"&gt;{ ++v; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #172b4d; background-color: #f4f5f7; margin: 10px 0px 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="color: #172b4d; background-color: #f4f5f7; margin: 10px 0px 0px;"&gt;It turns out that support for small data area with VLE is incomplete. I am testing a fix. If no regressions is found, it will be on the next release.&amp;nbsp;&lt;/P&gt;&lt;P style="color: #172b4d; background-color: #f4f5f7; margin: 10px 0px 0px;"&gt;Meanwhile, a work around is to not allocate atomic variables into small data area.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Nov 2018 20:11:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32-Design-Studio/Bug-in-GCC-4-9-4-eabi-VLE-PowerPC/m-p/822502#M3796</guid>
      <dc:creator>ra8797</dc:creator>
      <dc:date>2018-11-12T20:11:23Z</dc:date>
    </item>
  </channel>
</rss>

