Bug 189376 - Regression test failed on network address related functions
Summary: Regression test failed on network address related functions
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc   
(Show other bugs)
Version: rawhide
Hardware: i586
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2006-04-19 15:55 UTC by Anton Guda
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-04-24 15:48:14 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
regression diff file (2.22 KB, text/plain)
2006-04-19 15:55 UTC, Anton Guda
no flags Details

External Trackers
Tracker ID Priority Status Summary Last Updated
GNU Compiler Collection 27285 None None None Never

Description Anton Guda 2006-04-19 15:55:02 UTC
Description of problem:
While (second) rebuilding on postgresql error
appears at the test stage: some network-mask
related functions returns bad results.
Previous rebuild with same rpm was fine (local build 31 mar 2006).

Version-Release number of selected component (if applicable):

How reproducible:
now always

Steps to Reproduce:
1. rpmbuild -bi --target i586 postgresql.spec
Actual results:
build failed on test stage.

Expected results:
Build without errors.

Additional info:

Comment 1 Anton Guda 2006-04-19 15:55:02 UTC
Created attachment 127989 [details]
regression diff file

Comment 2 Tom Lane 2006-04-19 16:43:11 UTC
This looks to me like it could be a compiler bug, seeing that the same source
code passes this test fine on many other platforms.  Did you update gcc since
your last successful build?  Does the failure go away if you change the --target

The code in question is network_network() in src/backend/utils/adt/network.c
if you want to take a closer look.  I'm betting that gcc is misoptimizing the
shift-and-mask operations.

Comment 3 Anton Guda 2006-04-19 17:28:14 UTC
Yes, gcc was updated every time as it was updated in ``development'' 
Fedora branch. Tested arch: i566, i686.
I will try to rewrite some code to find misoptimization.
And will update gcc once again.

Comment 4 Anton Guda 2006-04-22 11:18:05 UTC
It's really a gcc bug.
The miscompilated code in src/backend/utils/adt/network.c: network_network:
  byte = 0;
  while (bits)
If bits == 25, the loop running 3 times, not 4,

If loop header rewrited as 


all tests passed.


Comment 5 Tom Lane 2006-04-22 18:49:14 UTC
Reclassifying as gcc bug.

Comment 6 Jakub Jelinek 2006-04-24 15:48:14 UTC
Tracking thsi upstream.

Note You need to log in before you can comment on or make changes to this bug.