<html>#2426: g++-10 possibly miscompiles parts of Carpet
<table style='border-spacing: 1ex 0pt; '>
<tr><td style='text-align:right'> Reporter:</td><td>Roland Haas</td></tr>
<tr><td style='text-align:right'> Status:</td><td>new</td></tr>
<tr><td style='text-align:right'>Milestone:</td><td></td></tr>
<tr><td style='text-align:right'> Version:</td><td></td></tr>
<tr><td style='text-align:right'> Type:</td><td>bug</td></tr>
<tr><td style='text-align:right'> Priority:</td><td>major</td></tr>
<tr><td style='text-align:right'>Component:</td><td>Other</td></tr>
</table>
<p>In #2410 its was found that while <code>-O2</code> compiles Baikal very slowly using the various <code>-f</code> options reported by <code>gcc -Q -O2 --help=optimizers</code> compiles Baikal more quickly.</p>
<p>However using these options makes the test <code>CarpetRegrid2/test/regrid2_2cen.par</code> fail with an error enforcing the <code>N13CarpetRegrid215combine_regionsE</code> property:</p>
<div class="codehilite"><pre><span></span>Property N13CarpetRegrid215combine_regionsE
WARNING level 0 from host ekohaes8 process 0
in thorn CarpetRegrid2, file /data/rhaas/postdoc/gr/cactus/ET_Turing/arrangements/Carpet/CarpetRegrid2/src/property.cc:34:
-> Property does not hold after being enforced
WARNING level 0 from host ekohaes8 process 0
in thorn CarpetRegrid2, file /data/rhaas/postdoc/gr/cactus/ET_Turing/arrangements/Carpet/CarpetRegrid2/src/property.cc:34:
-> Property does not hold after being enforced
</pre></div>
<p>and adding some extra output and debug code:</p>
<div class="codehilite language-diff"><pre><span></span><span class="gh">diff --git a/CarpetRegrid2/src/property.cc b/CarpetRegrid2/src/property.cc</span>
<span class="gh">index 167acd00..0beb791d 100644</span>
<span class="gd">--- a/CarpetRegrid2/src/property.cc</span>
<span class="gi">+++ b/CarpetRegrid2/src/property.cc</span>
<span class="gu">@@ -171,6 +171,12 @@ bool combine_regions::test_impl(gh const &hh, dh const &dd,</span>
CCTK_REAL const regions_size = static_cast<CCTK_REAL>(regions.at(rl).size());
CCTK_REAL const combined_size = static_cast<CCTK_REAL>(combined.size());
<span class="gi">+ std::cout << "regions " << regions << "\n";</span>
<span class="gi">+ std::cout << "combined_region " << combined << "\n";</span>
<span class="gi">+ std::cout << "combined_region.size() " << combined.size() << "\n";</span>
<span class="gi">+ std::cout << "set size: " << regio
<p>--<br/>
Ticket URL: <a href='https://bitbucket.org/einsteintoolkit/tickets/issues/2426/g-10-possibly-miscompiles-parts-of-carpet'>https://bitbucket.org/einsteintoolkit/tickets/issues/2426/g-10-possibly-miscompiles-parts-of-carpet</a></p>
</html>