Boost C++ Libraries: Ticket #7983: Boost:: polygon have issues when compiled using gcc 4.7.x with -O2 optimization level. https://svn.boost.org/trac10/ticket/7983 <p> Difference (and Sum) of 2 polygons ( a main polygon, and a small polygon inside the main polygon) creates a void or erroneous polygon when compiled with gcc 4.7 and -O2 optimization, and the same code works fine when using -01 optimization, or when using a GCC version older than 4.7 (with any optimization level) (Tested on Mingw and Linux) ( This issue is also found in 1.49 and other boost versions I have used). </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7983 Trac 1.4.3 jp.charras@… Tue, 05 Feb 2013 19:06:29 GMT attachment set https://svn.boost.org/trac10/ticket/7983 https://svn.boost.org/trac10/ticket/7983 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">test_polygon_diff.cpp</span> </li> </ul> <p> sample of erroeous polygon when using gcc 4.7 with -O2 optimization level </p> Ticket Andrii Sydorchuk Thu, 07 Mar 2013 22:15:56 GMT owner changed https://svn.boost.org/trac10/ticket/7983#comment:1 https://svn.boost.org/trac10/ticket/7983#comment:1 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Lucanus Simonson</span> to <span class="trac-author">Andrii Sydorchuk</span> </li> </ul> Ticket Andrii Sydorchuk Wed, 20 Mar 2013 20:48:03 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7983#comment:2 https://svn.boost.org/trac10/ticket/7983#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> Please, verify with Boost 1.53. I was trying to reproduce the issue, but got the following output (both with -O1 and -O2): <em> polyset polygons count 1 <strong></strong> polygon 0, corners count 12 </em></p> <blockquote> <p> 10, 10 5, 10 5, 5 5, -5 -5, -5 -5, 5 5, 5 5, 10 -10, 10 -10, -10 10, -10 10, 10 </p> </blockquote> Ticket jp.charras@… Wed, 27 Mar 2013 15:00:08 GMT <link>https://svn.boost.org/trac10/ticket/7983#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7983#comment:3</guid> <description> <p> Sorry for the delay. My tests are made using boost 1.53. I am thinking this issue is also on Linux, but I have a gcc 4.7 version only on Windows/mingw and I am able to test it only with gcc 4.7.2 on mingw (I have only the 4.6 version on my Linux install). </p> <p> Here is my command to build the test program (using boost 1.53) g++ -Wall -O2 -I /g/boost_1_53_0 test_polygon_diff.cpp </p> <p> and from gcc -v the gcc version is "gcc version 4.7.2 (GCC)" </p> <p> Thanks. </p> <p> the output is: polyset polygons count 0 </p> <p> (and works fine with O1 option) </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrii Sydorchuk</dc:creator> <pubDate>Sun, 09 Jun 2013 20:54:31 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/7983#comment:4 https://svn.boost.org/trac10/ticket/7983#comment:4 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">worksforme</span> </li> </ul> Ticket Andrii Sydorchuk Sun, 16 Jun 2013 01:35:19 GMT <link>https://svn.boost.org/trac10/ticket/7983#comment:5 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7983#comment:5</guid> <description> <p> Is it feasible for you to verify the issue with g++ 4.7.3? </p> </description> <category>Ticket</category> </item> <item> <author>jp.charras@…</author> <pubDate>Tue, 18 Jun 2013 17:57:38 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7983#comment:6 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7983#comment:6</guid> <description> <p> I do not have g++ 4.7.3, therefore I asked for help from other developers, who made some tests (tested compil options: -O1, -O2, -O3). Here are results I received: gcc version 4.7.1 20120723 [gcc-4_7-branch revision 189773] (SUSE Linux): error gcc version 4.7.2 (Debian 4.7.2-5) 32 bit: error gcc version 4.7.3 (unknown linux distrib) 32 bit: OK gcc version 4.7.3 (unknown linux distrib) 64 bit: OK gcc version 4.7.3 (<a class="missing wiki">Ubuntu/Linaro</a> 4.7.3-1ubuntu1): OK </p> <p> I hope this is useful for you. Thanks for you work. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>anonymous</dc:creator> <pubDate>Tue, 18 Jun 2013 20:46:40 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/7983#comment:7 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7983#comment:7</guid> <description> <p> Looks like the error might be specific to the 32bit platform. I will try to install gcc 4.7.2 on my 64-bit ubuntu. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Andrii Sydorchuk</dc:creator> <pubDate>Thu, 07 Nov 2013 00:06:33 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/7983#comment:8 https://svn.boost.org/trac10/ticket/7983#comment:8 <ul> <li><strong>status</strong> <span class="trac-field-old">reopened</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">worksforme</span> </li> </ul> <p> I was not able to reproduce the issue, thus marking it as not repeated. Potentially this defect has to do with the Polygon rounding modes and line intersections. If that's the case the issue will be tracked under ticket <a class="assigned ticket" href="https://svn.boost.org/trac10/ticket/6063" title="#6063: Bugs: resize does not offset rectangles (etc.) correctly or crashes (assigned)">#6063</a>. </p> Ticket R P Herrold <herrold@…> Tue, 24 Dec 2013 19:13:09 GMT cc set https://svn.boost.org/trac10/ticket/7983#comment:9 https://svn.boost.org/trac10/ticket/7983#comment:9 <ul> <li><strong>cc</strong> <span class="trac-author">herrold@…</span> added </li> </ul> Ticket