Bug 434885 - -fpeephole2 caused "internal compiler error: in final_scan_insn, at final.c:2514"
Summary: -fpeephole2 caused "internal compiler error: in final_scan_insn, at final.c:2...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc4
Version: 4
Hardware: x86_64
OS: Linux
low
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-02-26 00:08 UTC by Haiping Zhao
Modified: 2008-03-11 09:47 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-03-11 09:47:25 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
preprocessed source (45.05 KB, application/octet-stream)
2008-02-26 00:08 UTC, Haiping Zhao
no flags Details

Description Haiping Zhao 2008-02-26 00:08:16 UTC
Compiling this file:

#include <stdio.h>
#include <stdlib.h>
#include <sys/time.h>

int main() {
  struct timeval now;
  return now.tv_usec % 15;
}

with this command,

g++ -c -fpeephole2 test.cpp


The problem goes away if "now.tv_usec" is casted to "int" a 32-bit number. So,
it's related to the fact it's a 64-bit integer.

Comment 1 Haiping Zhao 2008-02-26 00:08:16 UTC
Created attachment 295862 [details]
preprocessed source

Comment 2 petrosyan 2008-02-26 05:07:42 UTC
Haiping,
Fedora Core 4, 5, and 6 are not maintained anymore. Can you reproduce this bug
on Fedora 7 or Fedora 8? I can not reproduce this on Fedora 8.

Comment 3 Jakub Jelinek 2008-03-11 09:47:25 UTC
Can't reproduce with current gcc 3.4.x, 4.0.x, 4.1.x, 4.2.x nor 4.3.0.


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