Bug 626889

Summary: avr-gcc Segfaults when compiled with the -mint8 option
Product: [Fedora] Fedora Reporter: Canyon Bliss <canyon>
Component: avr-gccAssignee: Thibault North <thibault.north>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 13CC: rhbugs, thibault.north, trond.danielsen
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: avr-gcc-4.5.3-1.fc14 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-09 04:10:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Canyon Bliss 2010-08-24 16:18:23 UTC
Description of problem:
The compiler segfaults when code is compiled with -mint8 option.


Version-Release number of selected component (if applicable): avr-gcc-4.5.1-1


How reproducible:
I tried various pieces of code and the code will not compile with the -mint8 option. Even with something as simple as:

/** \file testmint8.c */
#include <avr/io.h>

int main(void) {
  DDRB=0xFF;
  while(1)
    {
    PORTB++;
    }
}


Steps to Reproduce:
1. Add -mint8 to options when compiling

Example command:
avr-gcc -Wall -g2 -gstabs -O0 -fpack-struct -fshort-enums -std=gnu99 -funsigned-char -funsigned-bitfields -mint8 -mmcu=at90pwm3b -DF_CPU=8000000UL -MMD -MP -MF"testmint8.d" -MT"testmint8.d" -c -o"testmint8.o" "../testmint8.c"


Actual results:
<built-in>:0:0: internal compiler error: Segmentation fault


Expected results:
Code compiles


Additional info:
Results are the same for i686 and x86_64.

Comment 1 Hans Ulrich Niedermann 2010-11-01 17:45:28 UTC
The minimal example probably is an empty input file:

$ avr-gcc -mint8 -dM -E -xc /dev/null
<built-in>:0:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugzilla.redhat.com/> for instructions.
$ rpm -q avr-gcc
avr-gcc-4.5.1-2.fc14.i686
$

Comment 2 Hans Ulrich Niedermann 2010-11-01 17:47:51 UTC
For the record: The above command line results in the following internal call to cc1:

$ /usr/libexec/gcc/avr/4.5.1/cc1 -E -quiet /dev/null -mint8 -dM
<built-in>:0:0: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://bugzilla.redhat.com/> for instructions.
$

Comment 3 Thibault North 2010-11-01 18:37:39 UTC
I could reproduce it and so report it upstream:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46261

Will keep you posted.
Thanks for your report, and sorry for the late reply.

Comment 4 Thibault North 2010-11-02 18:50:44 UTC
This switch is no longer maintained, see the link of my previous post.

Comment 5 Thibault North 2011-05-01 17:27:44 UTC
A patch has been provided by upstream, it seems to work. An update will follow.

Comment 6 Fedora Update System 2011-05-02 03:09:16 UTC
avr-gcc-4.5.3-1.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/avr-gcc-4.5.3-1.fc14

Comment 7 Fedora Update System 2011-05-02 03:09:24 UTC
avr-gcc-4.5.3-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/avr-gcc-4.5.3-1.fc15

Comment 8 Fedora Update System 2011-05-02 22:30:13 UTC
Package avr-gcc-4.5.3-1.fc14:
* should fix your issue,
* was pushed to the Fedora 14 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing avr-gcc-4.5.3-1.fc14'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/avr-gcc-4.5.3-1.fc14
then log in and leave karma (feedback).

Comment 9 Fedora Update System 2011-05-09 04:09:54 UTC
avr-gcc-4.5.3-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 10 Fedora Update System 2011-05-10 21:19:06 UTC
avr-gcc-4.5.3-1.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.