Bug 21975 - [4.0 Regression] Segmentation fault while compiling ipw2100
Summary: [4.0 Regression] Segmentation fault while compiling ipw2100
Status: RESOLVED DUPLICATE of bug 22052
Alias: None
Product: gcc
Classification: Unclassified
Component: c (show other bugs)
Version: 4.0.1
: P2 normal
Target Milestone: 4.0.2
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-invalid-code
: 22245 22441 (view as bug list)
Depends on: 22052 23104
Blocks:
  Show dependency treegraph
 
Reported: 2005-06-09 07:42 UTC by Jürg Billeter
Modified: 2005-08-19 02:37 UTC (History)
4 users (show)

See Also:
Host:
Target: i686-pc-linux-gnu
Build:
Known to work: 3.4.0 4.1.0
Known to fail:
Last reconfirmed: 2005-06-09 13:51:14


Attachments
preprocessed source (166.90 KB, application/octet-stream)
2005-06-09 07:45 UTC, Jürg Billeter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jürg Billeter 2005-06-09 07:42:59 UTC
Compiling ipw2100 1.1.0 against linux 2.6.12-rc6 results in an internal compiler
error.

$ gcc -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.0-20050602/configure --prefix=/usr
--libexecdir=/usr/lib --infodir=/usr/share/info --mandir=/usr/share/man
--with-arch=pentium2 --enable-shared --disable-multilib --enable-clocale=gnu
--enable-threads=posix --enable-__cxa_atexit
Thread model: posix
gcc version 4.0.1 20050602 (prerelease)

$ gcc -Wp,-MD,/usr/src/ipw2100-1.1.0/.ipw2100.o.d  -nostdinc -isystem
/usr/lib/gcc/i686-pc-linux-gnu/4.0.1/include -D__KERNEL__ -Iinclude  -Wall
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
-ffreestanding     -fomit-frame-pointer -pipe -msoft-float
-mpreferred-stack-boundary=2 -fno-unit-at-a-time -mregparm=3
-Iinclude/asm-i386/mach-default -Wdeclaration-after-statement -Wno-pointer-sign
-I/usr/src/linux-2.6.12-rc6-paldo1/drivers/net/wireless -g
-Wa,-adhlms=/usr/src/ipw2100-1.1.0/ipw2100.o.lst -DCONFIG_PM
-DCONFIG_IPW_DEBUG=y -DCONFIG_IPW2100_MONITOR=y -DCONFIG_IEEE80211_DEBUG=y
-DCONFIG_IEEE80211_CRYPT=m -DCONFIG_IEEE80211_WPA=m
-DCONFIG_IEEE80211_CRYPT_TKIP=m -DCONFIG_IEEE80211_CRYPT_CCMP=m  -DMODULE
-DKBUILD_BASENAME=ipw2100 -DKBUILD_MODNAME=ipw2100 -c -o
/usr/src/ipw2100-1.1.0/ipw2100.o /usr/src/ipw2100-1.1.0/ipw2100.c
include/linux/etherdevice.h: In function 'ipw2100_set_address':
include/linux/etherdevice.h:84: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions
Comment 1 Jürg Billeter 2005-06-09 07:45:50 UTC
Created attachment 9053 [details]
preprocessed source
Comment 2 Andrew Pinski 2005-06-09 13:35:48 UTC
Before 4.0.0, we got an error (after replacing __builtin_offsetof):
pr21975.c:25417: redefinition of `is_multicast_ether_addr'
pr21975.c:24696: `is_multicast_ether_addr' previously defined here

reducing.
Comment 3 Andrew Pinski 2005-06-09 13:51:14 UTC
Reduced testcase:
static inline __attribute__((always_inline)) int func1(){}
static inline __attribute__((always_inline)) int func2() {return func1();}
extern inline __attribute__((always_inline)) int func1(){}
int func3(){return func2();}

I don't think this is valid code.

Note in the code I see the bodies for func1 (is_multicast_ether_addr).
Comment 4 gcc-bugzilla@gcc.gnu.org 2005-06-09 16:11:10 UTC
Subject:  Segmentation fault while compiling ipw2100



Comment 5 gcc-bugzilla@gcc.gnu.org 2005-06-09 16:11:13 UTC
Subject:  [4.0/4.1 Regression] Segmentation fault while compiling ipw2100


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-09 13:51 -------
Reduced testcase:
static inline __attribute__((always_inline)) int func1(){}
static inline __attribute__((always_inline)) int func2() {return func1();}
extern inline __attribute__((always_inline)) int func1(){}
int func3(){return func2();}

I don't think this is valid code.

Note in the code I see the bodies for func1 (is_multicast_ether_addr).

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
  GCC build triplet|i686-pc-linux-gnu           |
   GCC host triplet|i686-pc-linux-gnu           |
   Last reconfirmed|0000-00-00 00:00:00         |2005-06-09 13:51:14
               date|                            |
            Summary|Segmentation fault while    |[4.0/4.1 Regression]
                   |compiling ipw2100           |Segmentation fault while
                   |                            |compiling ipw2100
   Target Milestone|---                         |4.0.2


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21975
Comment 6 gcc-bugzilla@gcc.gnu.org 2005-06-09 16:11:13 UTC
Subject:  Segmentation fault while compiling ipw2100


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-06-09 13:35 -------
Before 4.0.0, we got an error (after replacing __builtin_offsetof):
pr21975.c:25417: redefinition of `is_multicast_ether_addr'
pr21975.c:24696: `is_multicast_ether_addr' previously defined here

reducing.

Comment 7 Andrew Pinski 2005-06-26 22:21:28 UTC
I think this was caused by my patch which also caused PR 22052 and should be fixed by the patch 
which should fix PR 22052 also.
Comment 8 GCC Commits 2005-06-29 00:11:48 UTC
Subject: Bug 21975

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	echristo@gcc.gnu.org	2005-06-29 00:11:37

Modified files:
	gcc            : c-decl.c ChangeLog 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: inline1.c inline2.c inline3.c inline4.c 
	                      inline5.c 

Log message:
	2005-06-28  Eric Christopher  <echristo@redhat.com>
	
	PR c/22052
	PR c/21975
	* c-decl.c (diagnose_mismatched_decls): Define DECL_EXTERN_INLINE.
	Use. Fix detection of invalid extern inline redefinition.
	
	2005-06-28  Eric Christopher  <echristo@redhat.com>
	
	PR c/22052
	PR c/21975
	* gcc.dg/inline1.c: New test.
	* gcc.dg/inline2.c: Ditto.
	* gcc.dg/inline3.c: Ditto.
	* gcc.dg/inline4.c: Ditto.
	* gcc.dg/inline5.c: Ditto.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&r1=1.668&r2=1.669
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.9267&r2=2.9268
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5702&r2=1.5703
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/inline1.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/inline2.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/inline3.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/inline4.c.diff?cvsroot=gcc&r1=NONE&r2=1.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/inline5.c.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 9 Andrew Pinski 2005-06-29 01:59:20 UTC
This is now rejected like it should.
Comment 10 Andrew Pinski 2005-06-30 14:23:38 UTC
*** Bug 22245 has been marked as a duplicate of this bug. ***
Comment 11 Andrew Pinski 2005-07-12 15:12:43 UTC
*** Bug 22441 has been marked as a duplicate of this bug. ***
Comment 12 Andrew Pinski 2005-08-19 02:37:01 UTC

*** This bug has been marked as a duplicate of 22052 ***
Comment 13 GCC Commits 2005-10-04 19:41:54 UTC
Subject: Bug 21975

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-4_0-branch
Changes by:	pinskia@gcc.gnu.org	2005-10-04 19:41:47

Modified files:
	gcc            : ChangeLog c-decl.c 
	gcc/testsuite  : ChangeLog 
Added files:
	gcc/testsuite/gcc.dg: inline1.c inline2.c inline3.c inline4.c 

Log message:
	2005-10-04  Andrew Pinski  <pinskia@physics.uc.edu>
	
	PR c/22052
	PR c/21975
	* c-decl.c (diagnose_mismatched_decls): Fix check for both
	decls being "extern inline".
	2005-10-04  Eric Christopher  <echristo@apple.com>
	
	PR c/22052
	PR c/21975
	* gcc.dg/inline1.c: New test.
	* gcc.dg/inline2.c: Ditto.
	* gcc.dg/inline3.c: Ditto.
	* gcc.dg/inline4.c: Ditto.
	* gcc.dg/inline5.c: Ditto.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=2.7592.2.445&r2=2.7592.2.446
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/c-decl.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.630.6.20&r2=1.630.6.21
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.424&r2=1.5084.2.425
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/inline1.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.18.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/inline2.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.18.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/inline3.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.18.1
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/gcc.dg/inline4.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.18.1