Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 1063327 - gcc: internal compiler error: Bus error (program cc1)
gcc: internal compiler error: Bus error (program cc1)
Product: Fedora
Classification: Fedora
Component: gcc (Show other bugs)
i686 Linux
unspecified Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2014-02-10 09:03 EST by Srdan Suka
Modified: 2015-02-17 05:24 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-02-17 05:24:08 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Srdan Suka 2014-02-10 09:03:52 EST
Description of problem:

bytecode_api.c: In function 'cli_bcapi_ilog2':
bytecode_api.c:1012:5: internal compiler error: Bus error
     f = (1<<26)*log((double)a / b) / log(2);
gcc: internal compiler error: Bus error (program cc1)

This is the critical funcion:

int32_t cli_bcapi_ilog2(struct cli_bc_ctx *ctx, uint32_t a, uint32_t b)
    double f;
    if (!b)
        return 0x7fffffff;
    /* log(a/b) is -32..32, so 2^26*32=2^31 covers the entire range of int32 */
    f = (1<<26)*log((double)a / b) / log(2);
    return (int32_t)myround(f);

If I replace log(2) with log(x) and define x=2, or replace log(2) with numeric value, compiler does not register any problem.

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

Name        : kernel
Arch        : i686
Version     : 3.12.9
Release     : 201.fc19

Name        : cpp
Arch        : i686
Version     : 4.8.2
Release     : 7.fc19

Name        : gcc
Arch        : i686
Version     : 4.8.2
Release     : 7.fc19

How reproducible:

Steps to Reproduce:

Actual results:

Expected results:

Additional info:
Comment 1 Jakub Jelinek 2014-02-10 09:09:20 EST
Please provide preprocessed testcase on which it can be reproduced, plus compiler options with which it can be reproduced.
Comment 2 Srdan Suka 2014-02-10 09:20:27 EST
Example test.c

#include <unistd.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include <string.h>
#include <math.h>
#include <ctype.h>

int main(int argc, char** argv)
    double f;

    f = log(2);

    return 0;

Output of : cc test.c

test.c: In function âmainâ:
test.c:16:5: internal compiler error: Bus error
     f = log(2);
cc: internal compiler error: Bus error (program cc1)
Comment 3 Fedora End Of Life 2015-01-09 16:09:40 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Marek Polacek 2015-02-17 05:24:08 EST
Can't reproduce.

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