[llvm-bugs] [Bug 38334] Propagate null pattern into condition blocks

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38334

David Bolvansky  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
 Fixed By Commit(s)||rL338191

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 9609 in oss-fuzz: llvm/clang-llvm-proto-fuzzer: ASSERT: Size + Offset <= Pos && "We don't support extending the stream"

2018-07-28 Thread ClusterFuzz-External via monorail via llvm-bugs


Comment #2 on issue 9609 by ClusterFuzz-External:  
llvm/clang-llvm-proto-fuzzer: ASSERT: Size + Offset <= Pos && "We don't  
support extending the stream"

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9609#c2

ClusterFuzz has detected this issue as fixed in range  
201807261853:201807270312.


Detailed report: https://oss-fuzz.com/testcase?key=4801854159454208

Project: llvm
Fuzzer: libFuzzer_llvm_clang-llvm-proto-fuzzer
Fuzz target binary: clang-llvm-proto-fuzzer
Job Type: libfuzzer_asan_llvm
Platform Id: linux

Crash Type: ASSERT
Crash Address:
Crash State:
  Size + Offset <= Pos && "We don't support extending the stream"
  ELFWriter::writeObject
  ELFSingleObjectWriter::writeObject

Sanitizer: address (ASAN)

Regressed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201807020801:201807030756
Fixed:  
https://oss-fuzz.com/revisions?job=libfuzzer_asan_llvm&range=201807261853:201807270312


Reproducer Testcase:  
https://oss-fuzz.com/download?testcase_id=4801854159454208


See https://github.com/google/oss-fuzz/blob/master/docs/reproducing.md for  
more information.


If you suspect that the result above is incorrect, try re-doing that job on  
the test case report page.


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] Issue 9609 in oss-fuzz: llvm/clang-llvm-proto-fuzzer: ASSERT: Size + Offset <= Pos && "We don't support extending the stream"

2018-07-28 Thread ClusterFuzz-External via monorail via llvm-bugs

Updates:
Labels: ClusterFuzz-Verified
Status: Verified

Comment #3 on issue 9609 by ClusterFuzz-External:  
llvm/clang-llvm-proto-fuzzer: ASSERT: Size + Offset <= Pos && "We don't  
support extending the stream"

https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=9609#c3

ClusterFuzz testcase 4801854159454208 is verified as fixed, so closing  
issue as verified.


If this is incorrect, please file a bug on  
https://github.com/google/oss-fuzz/issues/new


--
You received this message because:
  1. You were specifically CC'd on the issue

You may adjust your notification preferences at:
https://bugs.chromium.org/hosting/settings

Reply to this email to add a comment.
___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 38347] New: Crash with dependent type in template

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38347

Bug ID: 38347
   Summary: Crash with dependent type in template
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: C++
  Assignee: unassignedclangb...@nondot.org
  Reporter: v.reich...@netcologne.de
CC: dgre...@apple.com, llvm-bugs@lists.llvm.org

Clang crashes on the following valid code snippet:


template struct A
{
  struct B { typedef A X; };
};

template struct C
{
  struct A::B::X x;
};

C c;


clang-7: /tmp/LLVM/llvm/tools/clang/include/clang/AST/TypeNodes.def:106:
clang::TypeInfo clang::ASTContext::getTypeInfoImpl(const clang::Type*) const:
Assertion `!T->isDependentType() && "should not see dependent types here"'
failed.

Stack dump:
1.   parser at end of file
2.  fPR34487A.cc:17:8: LLVM IR generation of declaration 'c'
3.  fPR34487A.cc:17:8: Generating code for declaration 'c'

#8 0x03c2a339 clang::ASTContext::getTypeInfoImpl(clang::Type const*)
const (LLVM/bin/clang-7+0x3c2a339)
#9 0x03c26037 clang::ASTContext::getTypeInfo(clang::Type const*) const
(LLVM/bin/clang-7+0x3c26037)
#10 0x03c29475 clang::ASTContext::getTypeInfoInChars(clang::Type
const*) const (LLVM/bin/clang-7+0x3c29475)
#11 0x03c29502 clang::ASTContext::getTypeInfoInChars(clang::QualType)
const (LLVM/bin/clang-7+0x3c29502)
#12 0x03dd6a31 (anonymous
namespace)::ItaniumRecordLayoutBuilder::LayoutField(clang::FieldDecl const*,
bool) (LLVM/bin/clang-7+0x3dd6a31)
#13 0x03dd7546 (anonymous
namespace)::ItaniumRecordLayoutBuilder::LayoutFields(clang::RecordDecl const*)
(LLVM/bin/clang-7+0x3dd7546)
#14 0x03dd2713 clang::ASTContext::getASTRecordLayout(clang::RecordDecl
const*) const (LLVM/bin/clang-7+0x3dd2713)
#15 0x025e26f0 (anonymous
namespace)::CGRecordLowering::CGRecordLowering(clang::CodeGen::CodeGenTypes&,
clang::RecordDecl const*, bool) (LLVM/bin/clang-7+0x25e26f0)
#16 0x025e7c7f
clang::CodeGen::CodeGenTypes::ComputeRecordLayout(clang::RecordDecl const*,
llvm::StructType*) (LLVM/bin/clang-7+0x25e7c7f)
#17 0x026960e6
clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(clang::RecordDecl const*)
(LLVM/bin/clang-7+0x26960e6)
#18 0x0269742b
clang::CodeGen::CodeGenTypes::getCGRecordLayout(clang::RecordDecl const*)
(LLVM/bin/clang-7+0x269742b)
#19 0x026974c9
clang::CodeGen::CodeGenTypes::isZeroInitializable(clang::RecordDecl const*)
(LLVM/bin/clang-7+0x26974c9)
#20 0x025d8472
clang::CodeGen::CodeGenModule::EmitNullConstant(clang::QualType)
(LLVM/bin/clang-7+0x25d8472)
#21 0x025deeb3
clang::CodeGen::ConstantEmitter::tryEmitPrivateForVarInit(clang::VarDecl
const&) (LLVM/bin/clang-7+0x25deeb3)
#22 0x025df088
clang::CodeGen::ConstantEmitter::tryEmitForInitializer(clang::VarDecl const&)
(LLVM/bin/clang-7+0x25df088)
#23 0x0265c523
clang::CodeGen::CodeGenModule::EmitGlobalVarDefinition(clang::VarDecl const*,
bool) (LLVM/bin/clang-7+0x265c523)
#24 0x026755e1
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*) (LLVM/bin/clang-7+0x26755e1)
#25 0x02676750
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
(LLVM/bin/clang-7+0x2676750)
#26 0x02676cec
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) (.part.6636)
(LLVM/bin/clang-7+0x2676cec)
#27 0x02d11243 (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
(LLVM/bin/clang-7+0x2d11243)
#28 0x02d0b75d
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
(LLVM/bin/clang-7+0x2d0b75d)
#29 0x0343bcc6 clang::ParseAST(clang::Sema&, bool, bool)
(LLVM/bin/clang-7+0x343bcc6)
#30 0x02d0f5cf clang::CodeGenAction::ExecuteAction()
(LLVM/bin/clang-7+0x2d0f5cf)
#31 0x029c1b96 clang::FrontendAction::Execute()
(LLVM/bin/clang-7+0x29c1b96)
#32 0x0299682e
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
(LLVM/bin/clang-7+0x299682e)
#33 0x02a5e582
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
(LLVM/bin/clang-7+0x2a5e582)

clang version 7.0.0 (trunk)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /LLVM/bin

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 38309] Wrong codegen after r337498

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38309

Dave Green  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |FIXED

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 38348] New: polly crashing with -O3 -ffast-math

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38348

Bug ID: 38348
   Summary: polly crashing with -O3 -ffast-math
   Product: Polly
   Version: unspecified
  Hardware: PC
OS: Linux
Status: NEW
  Severity: normal
  Priority: P
 Component: Other
  Assignee: polly-...@googlegroups.com
  Reporter: cs15btech11...@iith.ac.in
CC: llvm-bugs@lists.llvm.org

Created attachment 20612
  --> https://bugs.llvm.org/attachment.cgi?id=20612&action=edit
Preprocessed source(s) by clang

Code works fine when following command is used to compile
"clang -O3 -ffast-math -c filename.c"
"clang -O3 -mllvm -polly filename.c"
but crashes on "clang -O3 -ffast-math -mllvm -polly filename.c" 

I get following output in console.
clang-7:
/home/pankaj/Installations/llvm7.00/llvm/tools/polly/lib/CodeGen/IslExprBuilder.cpp:724:
llvm::Value* polly::IslExprBuilder::createId(isl_ast_expr*): Assertion
`IDToValue.count(Id) && "Identifier not found"' failed.
Stack dump:
0.  Program arguments:
/home/pankaj/Installations/llvm7.00/build/bin/clang-7 -cc1 -triple
x86_64-unknown-linux-gnu -emit-obj -disable-free -main-file-name
bilateralFilterKernel.c -mrelocation-model static -mthread-model posix
-menable-no-infs -menable-no-nans -menable-unsafe-fp-math -fno-signed-zeros
-mreassociate -freciprocal-math -fno-trapping-math -ffp-contract=fast
-ffast-math -ffinite-math-only -masm-verbose -mconstructor-aliases
-munwind-tables -fuse-init-array -target-cpu x86-64 -dwarf-column-info
-debugger-tuning=gdb -momit-leaf-frame-pointer -coverage-notes-file
/home/pankaj/GSOC/ImageProcessing/BilateralFiltering/bilateralFilterKernel.gcno
-resource-dir /home/pankaj/Installations/llvm7.00/build/lib/clang/7.0.0
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/ipp/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/tbb/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/daal/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/ipp/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/tbb/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/daal/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/ipp/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/tbb/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/daal/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/ipp/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/mkl/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/tbb/include
-I/opt/intel/compilers_and_libraries_2017.4.196/linux/daal/include
-internal-isystem /usr/local/include -internal-isystem
/home/pankaj/Installations/llvm7.00/build/lib/clang/7.0.0/include
-internal-externc-isystem /usr/include/x86_64-linux-gnu
-internal-externc-isystem /include -internal-externc-isystem /usr/include -O3
-fdebug-compilation-dir /home/pankaj/GSOC/ImageProcessing/BilateralFiltering
-ferror-limit 19 -fmessage-length 119 -fobjc-runtime=gcc
-fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp
-mllvm -polly -o bilateralFilterKernel.o -x c bilateralFilterKernel.c 
1.   parser at end of file
2.  Per-module optimization passes
3.  Running pass 'Function Pass Manager' on module
'bilateralFilterKernel.c'.
4.  Running pass 'Region Pass Manager' on function '@bilateralFilterKernel'
5.  Running pass 'Polly - Create LLVM-IR from SCoPs' on basic block
'%entry.split'
/home/pankaj/Installations/llvm7.00/build/bin/clang-7(_ZN4llvm3sys15PrintStackTraceERNS_11raw_ostreamE+0x33)[0x34055f3]
/home/pankaj/Installations/llvm7.00/build/bin/clang-7[0x3405686]
/home/pankaj/Installations/llvm7.00/build/bin/clang-7(_ZN4llvm3sys17RunSignalHandlersEv+0x8e)[0x34039b8]
/home/pankaj/Installations/llvm7.00/build/bin/clang-7[0x3405009]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x11390)[0x7ff42d268390]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x38)[0x7ff42bfce428]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x16a)[0x7ff42bfd002a]
/lib/x86_64-linux-gnu/libc.so.6(+0x2dbd7)[0x7ff42bfc6bd7]
/lib/x86_64-linux-gnu/libc.so.6(+0x2dc82)[0x7ff42bfc6c82]
/home/pankaj/Installations/llvm7.00/build/bin/clang-7(_ZN5polly14IslExprBuilder8createIdEP12isl_ast_expr+0x9a)[0x41880d2]
/home/pankaj/Installations/llvm7.00/build/bin/clang-7(_ZN5polly14IslExprBuilder6createEP12isl_ast_expr+0x77)[0x418840d]
/home/pankaj/Installations/llvm7.00/build/bin/clang-7(_ZN5polly14IslExprBuilder11createOpBinEP12isl_ast_expr+0xfb)[0x4186941]
/home/pankaj/Installations/llvm7.00/build/bin/clang-7(_ZN5polly14IslExprBuilder8createOpEP12isl_ast_expr+0xd5)[0x4187e8b]
/home/pankaj/Installations/llvm7.00/build/bin/clang-7(_ZN5polly14IslExprBuilder6createEP12isl_ast_expr+0x62)[0x41883f8]
/home/pankaj/In

[llvm-bugs] [Bug 38349] New: Missed bit pattern

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38349

Bug ID: 38349
   Summary: Missed bit pattern
   Product: libraries
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: Scalar Optimizations
  Assignee: unassignedb...@nondot.org
  Reporter: david.bolvan...@gmail.com
CC: llvm-bugs@lists.llvm.org

According to https://blog.regehr.org/archives/1192 this pattern occurs often in
SPEC2006


int foo(int x, int y) {
int k = x & 15;
if(k == 0) {
int p = x & 7;
return p == 0; // true
}
return y;
}

Alive proof: https://rise4fun.com/Alive/OhV

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 37660] opt miscompiles with "opt -O3 -gvn-hoist -newgvn"

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=37660

Florian Hahn  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE
 CC||florian.h...@arm.com

--- Comment #3 from Florian Hahn  ---
Thanks for simplifying that to the NewGVN issue. I am closing the issue in
favor of PR37540, as  this already covers the same issue (just with metadata)

*** This bug has been marked as a duplicate of bug 37540 ***

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 37791] opt miscompiles with "opt -O3 -gvn-hoist"

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=37791

Florian Hahn  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||florian.h...@arm.com
 Resolution|--- |FIXED

--- Comment #1 from Florian Hahn  ---
The reproducer seems to work fine with r338205. Please re-open the issue if the
problem still persists.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 36635] opt crashes with "opt -gvn-hoist": Assertion `dominates(MD, U) && "Memory Def does not dominate it's uses"' failed

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=36635

Florian Hahn  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 CC||florian.h...@arm.com
 Resolution|--- |FIXED

--- Comment #2 from Florian Hahn  ---
The reproducer seems to work fine with r338205. Please re-open the issue if the
problem still persists.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 38350] New: cannot initialize a variable of type A with an rvalue of type A

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38350

Bug ID: 38350
   Summary: cannot initialize a variable of type A with an rvalue
of type A
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: zhong...@pku.org.cn
CC: llvm-bugs@lists.llvm.org

The code is as follow:

#include 

void test(const int *data, int dimension)
{
const int (*m)[dimension] = reinterpret_cast(data);

for (int i = 0; i < dimension; ++i) {
for (int j = 0; j < dimension; ++j)
std::cout << m[i][j] << " ";

std::cout << std::endl;
}
}

int main()
{
int data[][2] = { {1, 2}, {3, 4} };
test(*data, 2);
return 0;
}

clang rejects the code:

 error: cannot initialize a variable of type 'const int (*)[dimension]' with an
  rvalue of type 'const int (*)[dimension]'
const int (*m)[dimension] = reinterpret_cast(data);
^   ~~~
1 error generated.

gcc accepts it. 

My gcc is 9.0.0 and my clang is 7.0.0.

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 38351] New: some incompatible declarations not diagnosed

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38351

Bug ID: 38351
   Summary: some incompatible  declarations not diagnosed
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: zhong...@pku.org.cn
CC: llvm-bugs@lists.llvm.org

The code is as follow:

int f(int (*)[]);
int g() { int f(int (*)[2]); }
int f(int (*)[3]);

clang accepts the code, but gcc rejects it:

gcc code0.c 
code0.c:3:5: error: conflicting types for 'f'
 int f(int (*)[3]);
 ^
code0.c:2:15: note: previous declaration of 'f' was here
 int g() { int f(int (*)[2]); }

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 38352] New: Multiple attributes wrongly accepted without commas

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38352

Bug ID: 38352
   Summary: Multiple attributes wrongly accepted without commas
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: zhong...@pku.org.cn
CC: llvm-bugs@lists.llvm.org

clang wrongly accepts:

extern int foo (void) __attribute__ ((const const));

Multiple attributes inside a single __attribute__ (()) should be required to be
separated by commas, so ((const, const)). 

I tried gcc. It rejects the code:

gcc code0.c 
code0.c:1:44: error: expected ')' before 'const'
 extern int foo (void) __attribute__ ((const const));
^~
)
code0.c:1:51: error: expected ',' or ';' before ')' token
 extern int foo (void) __attribute__ ((const const));
   ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs


[llvm-bugs] [Bug 38353] New: clang fails to diagnose mismatch of enum types in prototype/function

2018-07-28 Thread via llvm-bugs
https://bugs.llvm.org/show_bug.cgi?id=38353

Bug ID: 38353
   Summary: clang fails to diagnose mismatch of enum types in
prototype/function
   Product: clang
   Version: trunk
  Hardware: PC
OS: Linux
Status: NEW
  Severity: enhancement
  Priority: P
 Component: -New Bugs
  Assignee: unassignedclangb...@nondot.org
  Reporter: zhong...@pku.org.cn
CC: llvm-bugs@lists.llvm.org

Compile the following code, clang compiles it without error: it
should generate a diagnostic.

enum e1 {a, b};
enum e2 {c, d};

void f(enum e1);

void f(x)
  enum e2 x;
{
  return;
}

Instead, gcc rejects the above code:

gcc code0.c 
code0.c: In function 'f':
code0.c:7:10: error: argument 'x' doesn't match prototype
  enum e2 x;
  ^
code0.c:4:6: error: prototype declaration
 void f(enum e1);
  ^

-- 
You are receiving this mail because:
You are on the CC list for the bug.___
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs